blob: cb0a39a9d0cf7ef16b2ec3fe79f59c9dd39dbe39 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Douglas Gregor5013a7e2009-09-24 23:39:01 +00002template<typename T>
3struct X0 {
4 typedef T* type;
5
6 void f0(T);
7 void f1(type);
8};
9
10template<> void X0<char>::f0(char);
11template<> void X0<char>::f1(type);
Douglas Gregor71ad4772010-02-16 19:28:15 +000012
13namespace 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 // expected-note{{attempt to specialize declaration here}}
18 {
John McCall1f476a12010-02-26 08:45:28 +000019 static locale::id id; // expected-error{{use of undeclared identifier}} FIXME: expected-error {{unknown type name}}
Douglas Gregor71ad4772010-02-16 19:28:15 +000020 };
21 numpunct<char>::~numpunct(); // expected-error{{template specialization requires 'template<>'}} \
22 // expected-error{{specialization of member 'PR6161::numpunct<char>::~numpunct' does not specialize an instantiated member}}
23}