diff options
Diffstat (limited to 'clang/test/SemaTemplate/instantiation-backtrace.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/instantiation-backtrace.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/SemaTemplate/instantiation-backtrace.cpp b/clang/test/SemaTemplate/instantiation-backtrace.cpp index 4c8ea13a8d7..f8aabff0973 100644 --- a/clang/test/SemaTemplate/instantiation-backtrace.cpp +++ b/clang/test/SemaTemplate/instantiation-backtrace.cpp @@ -1,7 +1,8 @@ // RUN: clang -fsyntax-only -verify %s -template<typename T> struct A; // expected-note{{template is declared here}} +template<typename T> struct A; // expected-note 2{{template is declared here}} -template<typename T> struct B : A<T*> { }; // expected-error{{implicit instantiation of undefined template}} +template<typename T> struct B : A<T*> { }; // expected-error{{implicit instantiation of undefined template}} \ +// expected-error{{implicit instantiation of undefined template 'struct A<X *>'}} template<typename T> struct C : B<T> { } ; // expected-note{{instantiation of template class}} @@ -14,3 +15,9 @@ template<typename T> struct F : E<T(T)> { }; // expected-note{{instantiation of void f() { (void)sizeof(F<int>); // expected-note{{instantiation of template class}} } + +typedef struct { } X; + +void g() { + (void)sizeof(B<X>); // expected-note{{in instantiation of template class 'struct B<X>' requested here}} +} |

