1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 template<typename T> 3 struct X0 { 4 typedef T* type; 5 6 void f0(T); 7 void f1(type); 8 }; 9 10 template<> void X0<char>::f0(char); 11 template<> void X0<char>::f1(type); 12 13 namespace PR6161 { 14 template<typename _CharT> 15 class numpunct : public locale::facet // expected-error{{use of undeclared identifier 'locale'}} \ 16 // expected-error{{expected class name}} 17 { 18 static locale::id id; // expected-error{{use of undeclared identifier}} 19 }; 20 numpunct<char>::~numpunct(); // expected-error{{expected the class name after '~' to name a destructor}} 21 } 22 23 namespace PR12331 { 24 template<typename T> struct S { 25 struct U { static const int n = 5; }; 26 enum E { e = U::n }; // expected-note {{implicit instantiation first required here}} 27 int arr[e]; 28 }; 29 template<> struct S<int>::U { static const int n = sizeof(int); }; // expected-error {{explicit specialization of 'U' after instantiation}} 30 } 31