1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s 2*f4a2713aSLionel Sambuc namespace N1 { 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc template<typename T> struct X0 { }; // expected-note{{here}} 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc namespace Inner { 7*f4a2713aSLionel Sambuc template<typename T> struct X1 { }; 8*f4a2713aSLionel Sambuc } 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc template struct X0<int>; 11*f4a2713aSLionel Sambuc template struct Inner::X1<int>; 12*f4a2713aSLionel Sambuc } 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc template<typename T> struct X2 { }; // expected-note{{here}} 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc template struct ::N1::Inner::X1<float>; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc namespace N2 { 19*f4a2713aSLionel Sambuc using namespace N1; 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc template struct X0<double>; // expected-error{{must occur in namespace 'N1'}} 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc template struct X2<float>; // expected-error{{at global scope}} 24*f4a2713aSLionel Sambuc } 25