1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 template<typename U
, typename T
>
4 return t
.template get
<U
>();
7 template<typename U
, typename T
>
9 // FIXME: When we pretty-print this, we lose the "template" keyword.
10 return t
.U::template get
<int&>();
14 template<typename T
> T
get();
19 int &ir
= f0
<int&>(x
);
22 struct XDerived
: public X
{
25 void test_f1(XDerived xd
) {
49 void do_destroy_B(B
<int> b
) {
55 template<typename T
> float* f1(T
);
58 template<typename T
> static float* f2(T
);
62 float *fp1
= x1
.f1
<>(17);
63 float *fp2
= x1
.f1
<int>(3.14); // expected-warning {{implicit conversion from 'double' to 'int' changes value from 3.14 to 3}}
65 float *ip2
= x1
.f1(3.14);
67 float* (X1::*mf1
)(int) = &X1::f1
;
68 float* (X1::*mf2
)(int) = &X1::f1
<>;
69 float* (X1::*mf3
)(float) = &X1::f1
<float>;
71 float* (*fp3
)(int) = &X1::f2
;
72 float* (*fp4
)(int) = &X1::f2
<>;
73 float* (*fp5
)(float) = &X1::f2
<float>;
74 float* (*fp6
)(int) = X1::f2
;
75 float* (*fp7
)(int) = X1::f2
<>;
76 float* (*fp8
)(float) = X1::f2
<float>;
79 template<int A
> struct X2
{
89 void f(X2
<sizeof(X3
<U
>().U::m
)>);
92 void f(X4
<X3
<int> > x4i
) {
94 x4i
.f
<X2
<sizeof(int)> >(x2
);
108 template< class T1
, class T2
>
111 public: // Range operations
112 template< class X
> X
tmpl( const X
* = 0 ) const;
127 namespace rdar8198511
{
128 template<int, typename U
>
134 struct X0
: Base
<1, T
> { };
141 this->x0
.Base
<1, int>::f();