blob: f8aabff0973f9afdd3cc27fbdbf59ae252a875ba [file] [log] [blame]
Douglas Gregoree1828a2009-03-10 18:03:33 +00001// RUN: clang -fsyntax-only -verify %s
Douglas Gregor98137532009-03-10 18:33:27 +00002template<typename T> struct A; // expected-note 2{{template is declared here}}
Douglas Gregoree1828a2009-03-10 18:03:33 +00003
Douglas Gregor98137532009-03-10 18:33:27 +00004template<typename T> struct B : A<T*> { }; // expected-error{{implicit instantiation of undefined template}} \
5// expected-error{{implicit instantiation of undefined template 'struct A<X *>'}}
Douglas Gregoree1828a2009-03-10 18:03:33 +00006
7template<typename T> struct C : B<T> { } ; // expected-note{{instantiation of template class}}
8
9template<typename T> struct D : C<T> { }; // expected-note{{instantiation of template class}}
10
11template<typename T> struct E : D<T> { }; // expected-note{{instantiation of template class}}
12
13template<typename T> struct F : E<T(T)> { }; // expected-note{{instantiation of template class}}
14
15void f() {
16 (void)sizeof(F<int>); // expected-note{{instantiation of template class}}
17}
Douglas Gregor98137532009-03-10 18:33:27 +000018
19typedef struct { } X;
20
21void g() {
22 (void)sizeof(B<X>); // expected-note{{in instantiation of template class 'struct B<X>' requested here}}
23}