[cfe-commits] r91791 - /cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp
John McCall
rjmccall at apple.com
Sat Dec 19 21:57:30 PST 2009
Author: rjmccall
Date: Sat Dec 19 23:57:29 2009
New Revision: 91791
URL: http://llvm.org/viewvc/llvm-project?rev=91791&view=rev
Log:
Test the lookup I wasn't sure would be done properly after the last patch.
Clang reasonably adds all the base specifiers in one pass; this is now required
for correctness to prevent lookup from going mad. But this has the advantage of
establishing the correct context when looking up base specifiers, which will be
important for access control.
Modified:
cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp
Modified: cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp?rev=91791&r1=91790&r2=91791&view=diff
==============================================================================
--- cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp (original)
+++ cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp Sat Dec 19 23:57:29 2009
@@ -1,9 +1,29 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR5741
-struct A {
- struct B { };
- struct C;
-};
+namespace test0 {
+ struct A {
+ struct B { };
+ struct C;
+ };
-struct A::C : B { };
+ struct A::C : B { };
+}
+
+namespace test1 {
+ struct Opaque1 {};
+ struct Opaque2 {};
+
+ struct A {
+ struct B { B(Opaque1); };
+ };
+ struct B {
+ B(Opaque2);
+ };
+
+ struct C : A, B {
+ // Apparently the base-or-member lookup is actually ambiguous
+ // without this qualification.
+ C() : A(), test1::B(Opaque2()) {}
+ };
+}
More information about the cfe-commits
mailing list