aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-20 05:57:29 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-20 05:57:29 +0000
commit84d11c7ba48023b2bd3375ef002e08fecdb186ce (patch)
tree5d8eeff56d47f4af6c3d09e7908b97239cc6ed34
parentbd0dfa5c37d422427080a0ae3af9b63e70e6e854 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91791 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp
index f22e4a467e..5f63392469 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp
@@ -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()) {}
+ };
+}