blob: e37fcd7c6a5dff5b0bf4af377e773a664c0e55d0 [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
Douglas Gregorff668032009-05-13 18:28:20 +00002namespace N1 {
3
4 template<typename T> struct X0 { }; // expected-note{{here}}
5
6 namespace Inner {
7 template<typename T> struct X1 { };
8 }
9
10 template struct X0<int>;
11 template struct Inner::X1<int>;
12}
13
14template<typename T> struct X2 { }; // expected-note{{here}}
15
16template struct ::N1::Inner::X1<float>;
17
18namespace N2 {
19 using namespace N1;
20
Richard Smith3e2e91e2011-10-18 02:28:33 +000021 template struct X0<double>; // expected-error{{must occur in namespace 'N1'}}
Douglas Gregorff668032009-05-13 18:28:20 +000022
23 template struct X2<float>; // expected-error{{at global scope}}
24}