Don't form a 'context-independent expr' reference to a member during
authorRichard Smith <richard@metafoo.co.uk>
Tue, 28 Jul 2020 00:28:06 +0000 (17:28 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Tue, 28 Jul 2020 02:38:22 +0000 (19:38 -0700)
commit23d6525cbdc9de7cbfe7640d1e9e4f25a0c5dd85
treed29750f236b3fe9caef8120ca22cdf152bc51390
parent6bf989b9474ace6a35021e6123d13b7fd59bf9f4
Don't form a 'context-independent expr' reference to a member during
name annotation.

Instead, defer forming the member access expression or DeclRefExpr until
we build the use of ClassifyName's result. Just build an
UnresolvedLookupExpr to track the LookupResult until we're ready to
consume it.

This also reverts commit 2f7269b6773de2750f9cd1417ef5f21cd6cf7a91 (other
than its testcase). That change was an attempted workaround for the same
problem.
clang/include/clang/Basic/TokenKinds.def
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseExpr.cpp
clang/lib/Parse/ParseTentative.cpp
clang/lib/Parse/Parser.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExprMember.cpp
clang/test/SemaTemplate/member-access-expr.cpp