]> granicus.if.org Git - clang/commit
Rework how we support C++ implicit member accesses. If we can resolve an
authorJohn McCall <rjmccall@apple.com>
Tue, 1 Dec 2009 22:10:20 +0000 (22:10 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 1 Dec 2009 22:10:20 +0000 (22:10 +0000)
commitaa81e1658d87b9011125c632aa902d154ae4b02c
tree2461221c4e0c971892fa37bfe369eaa16445b704
parentfcb91afaf2823d62453d7c19f66d30bb8dbb7c55
Rework how we support C++ implicit member accesses.  If we can resolve an
implicit member access to a specific declaration, go ahead and create
it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as
appropriate.  Otherwise, create an UnresolvedMemberExpr or
DependentScopeMemberExpr with a null base expression.

By representing implicit accesses directly in the AST, we get the ability
to correctly delay the decision about whether it's actually an instance
member access or not until resolution is complete.  This permits us
to correctly avoid diagnosing the 'problem' of 'MyType::foo()'
where the relationship to the type isn't really known until instantiation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90266 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ExprCXX.h
lib/AST/ExprCXX.cpp
lib/AST/StmtPrinter.cpp
lib/AST/StmtProfile.cpp
lib/Sema/Sema.h
lib/Sema/SemaExpr.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/TreeTransform.h
test/SemaTemplate/instantiate-method.cpp
test/SemaTemplate/qualified-id.cpp