1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 template<typename T> struct A; // expected-note 4{{template is declared here}} 3 4 template<typename T> struct B : A<T*> { }; // expected-error{{implicit instantiation of undefined template}} \ 5 // expected-error{{implicit instantiation of undefined template 'A<X *>'}} 6 7 template<typename T> struct C : B<T> { } ; // expected-note{{instantiation of template class}} 8 9 template<typename T> struct D : C<T> { }; // expected-note{{instantiation of template class}} 10 11 template<typename T> struct E : D<T> { }; // expected-note{{instantiation of template class}} 12 13 template<typename T> struct F : E<T(T)> { }; // expected-note{{instantiation of template class}} 14 15 void f() { 16 (void)sizeof(F<int>); // expected-note{{instantiation of template class}} 17 } 18 19 typedef struct { } X; 20 21 void g() { 22 (void)sizeof(B<X>); // expected-note{{in instantiation of template class 'B<X>' requested here}} 23 } 24 25 template<typename T> 26 struct G : A<T>, // expected-error{{implicit instantiation of undefined template 'A<int>'}} 27 A<T*> // expected-error{{implicit instantiation of undefined template 'A<int *>'}} 28 { }; 29 30 void h() { 31 (void)sizeof(G<int>); // expected-note{{in instantiation of template class 'G<int>' requested here}} 32 } 33