diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:39:40 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:39:40 +0000 |
commit | a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824 (patch) | |
tree | a6082d4d1d1e9ddaea09a6a04bb4a47da95d642d /test/SemaTemplate/instantiate-member-expr.cpp | |
parent | bb1e3bc1e0be2b8f891db46457a8943451bf4d8b (diff) | |
download | FreeBSD-src-a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824.zip FreeBSD-src-a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824.tar.gz |
Update clang to r93512.
Diffstat (limited to 'test/SemaTemplate/instantiate-member-expr.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-member-expr.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-member-expr.cpp b/test/SemaTemplate/instantiate-member-expr.cpp index db13624..324363c 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}} +} |