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 /include | |
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 'include')
-rw-r--r-- | include/clang/Parse/Action.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h index 23e02e4d67..0781a04777 100644 --- a/include/clang/Parse/Action.h +++ b/include/clang/Parse/Action.h @@ -236,6 +236,27 @@ public: return 0; } + /// 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) { + return ExprEmpty(); + } + + /// 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 @@ -820,7 +841,8 @@ public: tok::TokenKind OpKind, SourceLocation MemberLoc, IdentifierInfo &Member, - DeclPtrTy ObjCImpDecl) { + DeclPtrTy ObjCImpDecl, + const CXXScopeSpec *SS = 0) { return ExprEmpty(); } |