summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-member-expr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-12 08:19:04 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-12 08:19:04 +0000
commit31f82720d03f34f8af1c59441fc89fbbf3efae14 (patch)
treea44691cab997a817f8a3442cf8de5b88928962f8 /clang/test/SemaTemplate/instantiate-member-expr.cpp
parentd41071329d3fd5f08fa33e04a32936dda940a903 (diff)
downloadbcm5719-llvm-31f82720d03f34f8af1c59441fc89fbbf3efae14.tar.gz
bcm5719-llvm-31f82720d03f34f8af1c59441fc89fbbf3efae14.zip
Replace one hack with a different hack: strip out the ObjectType
parameters to the Transform*Type functions and instead call out the specific cases where an object type and the unqualified lookup results are important. Fixes an assert and failed compile on a testcase from PR7248. llvm-svn: 118887
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-member-expr.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-member-expr.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-member-expr.cpp b/clang/test/SemaTemplate/instantiate-member-expr.cpp
index 188705ce213..04bfada2505 100644
--- a/clang/test/SemaTemplate/instantiate-member-expr.cpp
+++ b/clang/test/SemaTemplate/instantiate-member-expr.cpp
@@ -49,3 +49,20 @@ namespace test1 {
};
template struct O::B<int>; // expected-note {{in instantiation}}
}
+
+// PR7248
+namespace test2 {
+ template <class T> struct A {
+ void foo() {
+ T::bar(); // expected-error {{type 'int' cannot}}
+ }
+ };
+
+ template <class T> class B {
+ void foo(A<T> a) {
+ a.test2::template A<T>::foo(); // expected-note {{in instantiation}}
+ }
+ };
+
+ template class B<int>;
+}
OpenPOWER on IntegriCloud