blob: 8a10a87e610e930a8e0415cf76bd213f9d8d7a1c [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Douglas Gregor83ddad32009-08-26 21:14:46 +00002
3struct X0 { // expected-note 4{{candidate}}
4 X0(int*, float*); // expected-note 4{{candidate}}
5};
6
7template<typename T, typename U>
8X0 f0(T t, U u) {
9 X0 x0(t, u); // expected-error{{no matching}}
10 return X0(t, u); // expected-error{{no matching}}
11}
12
13void test_f0(int *ip, float *fp, double *dp) {
14 f0(ip, fp);
15 f0(ip, dp); // expected-note{{instantiation}}
16}
17
18template<typename Ret, typename T, typename U>
19Ret f1(Ret *retty, T t, U u) {
20 Ret r0(t, u); // expected-error{{no matching}}
21 return Ret(t, u); // expected-error{{no matching}}
22}
23
24void test_f1(X0 *x0, int *ip, float *fp, double *dp) {
25 f1(x0, ip, fp);
26 f1(x0, ip, dp); // expected-note{{instantiation}}
27}
28