Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s |
Douglas Gregor | ff66803 | 2009-05-13 18:28:20 +0000 | [diff] [blame] | 2 | namespace 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 | |
| 14 | template<typename T> struct X2 { }; // expected-note{{here}} |
| 15 | |
| 16 | template struct ::N1::Inner::X1<float>; |
| 17 | |
| 18 | namespace N2 { |
| 19 | using namespace N1; |
| 20 | |
Richard Smith | 3e2e91e | 2011-10-18 02:28:33 +0000 | [diff] [blame] | 21 | template struct X0<double>; // expected-error{{must occur in namespace 'N1'}} |
Douglas Gregor | ff66803 | 2009-05-13 18:28:20 +0000 | [diff] [blame] | 22 | |
| 23 | template struct X2<float>; // expected-error{{at global scope}} |
| 24 | } |