summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-06 03:17:00 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-06 03:17:00 +0000
commitd806156d5459555168540fdf3db4f473cd3f81cf (patch)
tree60b3a05de9f6f9ff7e8cdf02aec449cdf69eefd6 /clang/lib/Sema/Sema.h
parent3c7b95d9aaaa06a856aa08a6ebce23d4825b15d9 (diff)
downloadbcm5719-llvm-d806156d5459555168540fdf3db4f473cd3f81cf.tar.gz
bcm5719-llvm-d806156d5459555168540fdf3db4f473cd3f81cf.zip
Support nested-name-specifiers for C++ member access expressions, e.g.,
this->Base::foo from James Porter! llvm-svn: 78278
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 63ecdcb108d..5093d71ac01 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/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
OpenPOWER on IntegriCloud