blob: 17028da0692c494e9e63e30dcfd24044eed5ee5f [file] [log] [blame]
Douglas Gregorf03d7c72008-11-05 15:29:30 +00001// RUN: clang -fsyntax-only -verify %s
2
3class X {
4public:
5 explicit X(const X&);
6 X(int*); // expected-note{{candidate function}}
7 explicit X(float*);
8};
9
10class Y : public X { };
11
12void f(Y y, int *ip, float *fp) {
13 X x1 = y; // expected-error{{no matching constructor for initialization of 'x1'; candidates are:}}
14 X x2 = 0;
15 X x3 = ip;
16 X x4 = fp; // expected-error{{incompatible type initializing 'x4', expected 'class X'}}
17}