summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-member-expr.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-01-15 15:39:40 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-01-15 15:39:40 +0000
commitee791dde723a2089c681d2ab6a9d4f96379d5f49 (patch)
treea6082d4d1d1e9ddaea09a6a04bb4a47da95d642d /test/SemaTemplate/instantiate-member-expr.cpp
parentabe15e553e58165e7692c0d0842865c488ed7b45 (diff)
Notes
Diffstat (limited to 'test/SemaTemplate/instantiate-member-expr.cpp')
-rw-r--r--test/SemaTemplate/instantiate-member-expr.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-member-expr.cpp b/test/SemaTemplate/instantiate-member-expr.cpp
index db13624d44267..324363ce96dca 100644
--- a/test/SemaTemplate/instantiate-member-expr.cpp
+++ b/test/SemaTemplate/instantiate-member-expr.cpp
@@ -25,3 +25,27 @@ class RetainReleaseChecker { };
void f(GRExprEngine& Eng) {
Eng.registerCheck(new RetainReleaseChecker); // expected-note {{in instantiation of function template specialization 'GRExprEngine::registerCheck<class RetainReleaseChecker>' requested here}}
}
+
+// PR 5838
+namespace test1 {
+ template<typename T> struct A {
+ int a;
+ };
+
+ template<typename T> struct B : A<float>, A<T> {
+ void f() {
+ a = 0; // should not be ambiguous
+ }
+ };
+ template struct B<int>;
+
+ struct O {
+ int a;
+ template<typename T> struct B : A<T> {
+ void f() {
+ a = 0; // expected-error {{type 'struct test1::O' is not a direct or virtual base of ''B<int>''}}
+ }
+ };
+ };
+ template struct O::B<int>; // expected-note {{in instantiation}}
+}