summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-21 18:36:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-21 18:36:56 +0000
commit90d554ecb30d5282aff54aca2f9b0f3751e83c8c (patch)
tree5a7fde105ec946945bbd76347cc49828f8340300 /clang/lib/Sema/Sema.h
parent901e717f9295e5d9616777ad2a0c89c86ef5268d (diff)
downloadbcm5719-llvm-90d554ecb30d5282aff54aca2f9b0f3751e83c8c.tar.gz
bcm5719-llvm-90d554ecb30d5282aff54aca2f9b0f3751e83c8c.zip
Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g.,
typedef int Int; int *p; p->Int::~Int(); This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression. llvm-svn: 96743
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 25ca3d1144c..4ea379328c1 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -2198,7 +2198,8 @@ public:
virtual CXXScopeTy *ActOnCXXGlobalScopeSpecifier(Scope *S,
SourceLocation CCLoc);
- bool isAcceptableNestedNameSpecifier(NamedDecl *SD);
+ bool isAcceptableNestedNameSpecifier(NamedDecl *SD,
+ bool MayBePseudoDestructor = false);
NamedDecl *FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS);
@@ -2207,6 +2208,7 @@ public:
SourceLocation IdLoc,
SourceLocation CCLoc,
IdentifierInfo &II,
+ bool MayBePseudoDestructor,
QualType ObjectType,
NamedDecl *ScopeLookupResult,
bool EnteringContext,
@@ -2217,12 +2219,14 @@ public:
SourceLocation IdLoc,
SourceLocation CCLoc,
IdentifierInfo &II,
+ bool MayBePseudoDestructor,
TypeTy *ObjectType,
bool EnteringContext);
virtual bool IsInvalidUnlessNestedName(Scope *S,
const CXXScopeSpec &SS,
IdentifierInfo &II,
+ bool MayBePseudoDestructor,
TypeTy *ObjectType,
bool EnteringContext);
@@ -2238,7 +2242,8 @@ public:
const CXXScopeSpec &SS,
TypeTy *Type,
SourceRange TypeRange,
- SourceLocation CCLoc);
+ SourceLocation CCLoc,
+ bool MayBePseudoDestructor);
virtual bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS);
OpenPOWER on IntegriCloud