diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-08-06 03:17:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-08-06 03:17:00 +0000 |
commit | fe85cedd58df7daed29201703cfb8806e12876d0 (patch) | |
tree | 3839a33ad270a9f4ed978e24e87a93d3ad409fdd /lib/Sema/Sema.h | |
parent | 4403a5e1f956fa86d515492dbe7c7a2817d8780d (diff) |
Support nested-name-specifiers for C++ member access expressions, e.g.,
this->Base::foo
from James Porter!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.h')
-rw-r--r-- | lib/Sema/Sema.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index 63ecdcb108..5093d71ac0 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -833,9 +833,8 @@ public: SourceLocation *CommaLocs, SourceLocation RParenLoc); - ExprResult BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, - SourceLocation MemberLoc, - IdentifierInfo &Member); + OwningExprResult BuildOverloadedArrowExpr(Scope *S, ExprArg Base, + SourceLocation OpLoc); /// Helpers for dealing with blocks and functions. void CheckFallThroughForFunctionDef(Decl *D, Stmt *Body); @@ -1519,7 +1518,8 @@ public: tok::TokenKind OpKind, SourceLocation MemberLoc, IdentifierInfo &Member, - DeclPtrTy ImplDecl); + DeclPtrTy ImplDecl, + const CXXScopeSpec *SS = 0); virtual void ActOnDefaultCtorInitializers(DeclPtrTy CDtorDecl); bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, @@ -1882,6 +1882,23 @@ public: SourceRange TypeRange, SourceLocation CCLoc); + /// ActOnCXXEnterMemberScope - Called when a C++ class member accessor ('.' + /// or '->') is parsed. After this method is called, according to + /// [C++ 3.4.5p4], qualified-ids should be looked up in the contexts of both + /// the entire postfix-expression and the scope of the class of the object + /// expression. + /// 'SS' should be an empty CXXScopeSpec to be filled with the class's scope. + virtual OwningExprResult ActOnCXXEnterMemberScope(Scope *S, CXXScopeSpec &SS, + ExprArg Base, + tok::TokenKind OpKind); + + /// ActOnCXXExitMemberScope - Called when a postfix-expression that previously + /// invoked ActOnCXXEnterMemberScope() is finished. 'SS' is the same + /// CXXScopeSpec that was passed to ActOnCXXEnterMemberScope. Used to + /// indicate that names should revert to being looked up in the defining + /// scope. + virtual void ActOnCXXExitMemberScope(Scope *S, const CXXScopeSpec &SS); + /// ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global /// scope or nested-name-specifier) is parsed, part of a declarator-id. /// After this method is called, according to [C++ 3.4.3p3], names should be |