[llvm-branch-commits] [cfe-branch] r105021 - in /cfe/branches/Apple/whitney: lib/Parse/ParseExpr.cpp test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp test/SemaTemplate/destructor-template.cpp
Daniel Dunbar
daniel at zuster.org
Fri May 28 16:05:58 PDT 2010
Author: ddunbar
Date: Fri May 28 18:05:57 2010
New Revision: 105021
URL: http://llvm.org/viewvc/llvm-project?rev=105021&view=rev
Log:
Merge r104834:
--
Author: Douglas Gregor <dgregor at apple.com>
Date: Thu May 27 15:25:59 2010 +0000
When we've parsed a nested-name-specifier in a member access
expression, "forget" about the object type; only the
nested-name-specifier matters for name lookup purposes. Fixes PR7239.
Modified:
cfe/branches/Apple/whitney/lib/Parse/ParseExpr.cpp
cfe/branches/Apple/whitney/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp
cfe/branches/Apple/whitney/test/SemaTemplate/destructor-template.cpp
Modified: cfe/branches/Apple/whitney/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Parse/ParseExpr.cpp?rev=105021&r1=105020&r2=105021&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Parse/ParseExpr.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Parse/ParseExpr.cpp Fri May 28 18:05:57 2010
@@ -1022,6 +1022,8 @@
ParseOptionalCXXScopeSpecifier(SS, ObjectType, false,
&MayBePseudoDestructor);
+ if (SS.isNotEmpty())
+ ObjectType = 0;
}
if (Tok.is(tok::code_completion)) {
Modified: cfe/branches/Apple/whitney/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp?rev=105021&r1=105020&r2=105021&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp (original)
+++ cfe/branches/Apple/whitney/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp Fri May 28 18:05:57 2010
@@ -20,5 +20,5 @@
typedef A AB;
int main() {
AB *p;
- p->AB::~AB(); // expected-error{{identifier 'AB' in pseudo-destructor expression does not name a type}}
+ p->AB::~AB(); // expected-error{{expected the class name after '~' to name a destructor}}
}
Modified: cfe/branches/Apple/whitney/test/SemaTemplate/destructor-template.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaTemplate/destructor-template.cpp?rev=105021&r1=105020&r2=105021&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaTemplate/destructor-template.cpp (original)
+++ cfe/branches/Apple/whitney/test/SemaTemplate/destructor-template.cpp Fri May 28 18:05:57 2010
@@ -40,3 +40,13 @@
template void f<const volatile int>(int *);
}
+
+namespace PR7239 {
+ template<class E> class A { };
+ class B {
+ void f() {
+ A<int>* x;
+ x->A<int>::~A<int>();
+ }
+ };
+}
More information about the llvm-branch-commits
mailing list