1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template<typename FromCl>
6 static void isa(const FromCl &Val) { }
9 template<class X, class Y>
10 void isa(const Y &Val) { return isa_impl_cl<Y>::template isa<X>(Val); }
13 void f0(const Value &Val) { isa<Value>(Val); }
15 // Implicit template-ids.
27 void test_X0_int(X0<int> xi, float f) {
31 // Not template-id expressions, but they almost look like it.
42 Y<X<I> >(::X<I>(0, 0));
48 // 'template' as a disambiguator.
65 Y0::template f1<U>(0);
69 Y0::template f2<U>(0);
72 Y0::template f3(0); // expected-error {{'f3' following the 'template' keyword does not refer to a template}}
73 Y0::template f3(); // expected-error {{'f3' following the 'template' keyword does not refer to a template}}
77 x = Y0::f4<int>(0); // expected-error {{assigning to 'int' from incompatible type 'void'}}
78 x = Y0::template f4(0); // expected-error {{assigning to 'int' from incompatible type 'void'}}
81 x = this->f4<int>(0); // expected-error {{assigning to 'int' from incompatible type 'void'}}
82 x = this->template f4(0); // expected-error {{assigning to 'int' from incompatible type 'void'}}
95 A::template B<I>::template b1(); // expected-error {{'b1' following the 'template' keyword does not refer to a template}}
98 template void f5<0>(); // expected-note {{in instantiation of function template specialization 'f5<0>' requested here}}
101 template <template <typename> class D> // expected-note{{previous use is here}}
103 template class D<C>; // expected-error {{template template argument 'D' cannot be referenced with a class specifier}}