summaryrefslogtreecommitdiff
path: root/test/CXX/basic/basic.lookup/basic.lookup.classref
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/basic/basic.lookup/basic.lookup.classref')
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp18
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.classref/p3.cpp2
2 files changed, 19 insertions, 1 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp b/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
index 3fde0daa96cfb..c35af1def2085 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
@@ -44,3 +44,21 @@ void resolves_to_different() {
v.set<double>(3.2);
}
}
+
+namespace rdar9915664 {
+ struct A {
+ template<typename T> void a();
+ };
+
+ struct B : A { };
+
+ struct C : A { };
+
+ struct D : B, C {
+ A &getA() { return static_cast<B&>(*this); }
+
+ void test_a() {
+ getA().a<int>();
+ }
+ };
+}
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.classref/p3.cpp b/test/CXX/basic/basic.lookup/basic.lookup.classref/p3.cpp
index 4a0b387379761..cd7e669527bcd 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.classref/p3.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.classref/p3.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++0x [basic.lookup.classref]p3:
-// If the unqualified-id is ∼type-name, the type-name is looked up in the
+// If the unqualified-id is ~type-name, the type-name is looked up in the
// context of the entire postfix-expression. If the type T of the object
// expression is of a class type C, the type-name is also looked up in the
// scope of class C. At least one of the lookups shall find a name that