1 // RUN: %clang_cc1 -fsyntax-only -verify %s
12 template<typename T
, typename Result
>
15 Result result
= f0(t
);
20 template struct N2::call_f0
<int, char&>;
21 template struct N2::call_f0
<N1::X0
, int&>;
24 template<typename T
, typename Result
>
27 Result
&result
= f0(t
); // expected-error {{undeclared identifier}} \
28 expected
-error
{{neither visible in the
template definition nor found by argument
-dependent lookup
}}
33 template struct N3::call_f0
<int, char&>; // expected-note{{instantiation}}
34 template struct N3::call_f0
<N1::X0
, int&>;
36 short& f0(char); // expected-note {{should be declared prior to the call site}}
38 template<typename T
, typename Result
>
41 Result
&result
= f0(t
);
46 template struct N4::call_f0
<int, short&>;
47 template struct N4::call_f0
<N1::X0
, int&>;
48 template struct N3::call_f0
<int, short&>; // expected-note{{instantiation}}
50 // FIXME: test overloaded function call operators, calls to member