1 // RUN: clang-cc -fsyntax-only -verify %s
2 
3 int x(1);
4 int (x2)(1);
5 
6 void f() {
7   int x(1);
8   int (x2)(1);
9   for (int x(1);;) {}
10 }
11 
12 class Y {
13   explicit Y(float);
14 };
15 
16 class X { // expected-note{{candidate function}}
17 public:
18   explicit X(int); // expected-note{{candidate function}}
19   X(float, float, float); // expected-note{{candidate function}}
20   X(float, Y); // expected-note{{candidate function}}
21 };
22 
23 class Z {
24 public:
25   Z(int);
26 };
27 
28 void g() {
29   X x1(5);
30   X x2(1.0, 3, 4.2);
31   X x3(1.0, 1.0); // expected-error{{no matching constructor for initialization of 'x3'; candidates are:}}
32   Y y(1.0);
33   X x4(3.14, y);
34 
35   Z z; // expected-error{{no matching constructor for initialization of 'z'}}
36 }
37