1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 3 // PR5061 4 namespace a { 5 template <typename T> class C {}; 6 } 7 namespace b { f0(a::C<T> & a0)8 template<typename T> void f0(a::C<T> &a0) { } 9 } 10 11 12 namespace test1 { 13 int a = 0; 14 template <class T> class Base { }; 15 template <class T> class Derived : public Base<T> { foo()16 int foo() { 17 return test1::a; 18 } 19 }; 20 } 21 22 namespace test2 { 23 class Impl { 24 public: 25 int foo(); 26 }; 27 template <class T> class Magic : public Impl { foo()28 int foo() { 29 return Impl::foo(); 30 } 31 }; 32 } 33 34 namespace PR6063 { 35 template <typename T> void f(T, T); 36 37 namespace detail 38 { 39 using PR6063::f; 40 } 41 42 template <typename T> g(T a,T b)43 void g(T a, T b) 44 { 45 detail::f(a, b); 46 } 47 } 48 49 namespace PR12291 { 50 template <typename T> 51 class Outer2 { 52 template <typename V> 53 template <typename W> 54 class Outer2<V>::Inner; // expected-error{{nested name specifier 'Outer2<V>::' for declaration does not refer into a class, class template or class template partial specialization}} 55 }; 56 } 57