Home | History | Annotate | Download | only in Parser

Lines Matching full:template

4 // RUN: %clang_cc1 -fsyntax-only -verify %s -fdelayed-template-parsing
5 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -fdelayed-template-parsing
6 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -fdelayed-template-parsing
8 template<typename T> struct A {};
10 // Check for template argument lists followed by junk
16 template <bool> struct S {};
19 // Test behavior when a template-id is ended by a token which starts with '>'.
21 template<typename T> struct S { S(); S(T); };
24 template<typename T> void t();
38 template <typename x>
41 void bar(foo *X) { // expected-error {{requires template arguments}}
46 template <class T>
50 new C(); // expected-error {{requires template arguments}}
57 template<class T1, typename T2> struct Known { }; // expected-note 3 {{template is declared here}}
58 template<class T1, typename T2> struct X;
59 template<class T1, typename T2> struct ABC; // expected-note {{template is declared here}}
60 template<int N1, int N2> struct ABC2 {};
62 template<class T1, typename T2> struct foo :
63 UnknownBase<T1,T2> // expected-error {{unknown template name 'UnknownBase'}}
66 template<class T1, typename T2> struct foo2 :
67 UnknownBase<T1,T2>, // expected-error {{unknown template name 'UnknownBase'}}
68 Known<T1> // expected-error {{too few template arguments for class template 'Known'}}
71 template<class T1, typename T2> struct foo3 :
72 UnknownBase<T1,T2,ABC<T2,T1> > // expected-error {{unknown template name 'UnknownBase'}}
75 template<class T1, typename T2> struct foo4 :
76 UnknownBase<T1,ABC<T2> >, // expected-error {{unknown template name 'UnknownBase'}} \
77 // expected-error {{too few template arguments for class template 'ABC'}}
78 Known<T1> // expected-error {{too few template arguments for class template 'Known'}}
81 template<class T1, typename T2> struct foo5 :
82 UnknownBase<T1,T2,ABC<T2,T1>> // expected-error {{unknown template name 'UnknownBase'}}
88 template<class T1, typename T2> struct foo6 :
89 UnknownBase<T1,ABC<T2,T1>>, // expected-error {{unknown template name 'UnknownBase'}}
93 Known<T1> // expected-error {{too few template arguments for class template 'Known'}}
96 template<class T1, typename T2, int N> struct foo7 :
97 UnknownBase<T1,T2,(N>1)> // expected-error {{unknown template name 'UnknownBase'}}
100 template<class T1, typename T2> struct foo8 :
101 UnknownBase<X<int,int>,X<int,int>> // expected-error {{unknown template name 'UnknownBase'}}
107 template<class T1, typename T2> struct foo9 :
108 UnknownBase<Known<int,int>,X<int,int>> // expected-error {{unknown template name 'UnknownBase'}}
114 template<class T1, typename T2> struct foo10 :
115 UnknownBase<Known<int,int>,X<int,X<int,int>>> // expected-error {{unknown template name 'UnknownBase'}}
121 template<int N1, int N2> struct foo11 :
122 UnknownBase<2<N1,N2<4> // expected-error {{unknown template name 'UnknownBase'}}
128 template<typename T, T> struct S {};
129 template<typename T> int g(S<T, (T())> *);