// RUN: clang-cc -fsyntax-only -verify %s struct X0 { // expected-note{{candidate}} X0(int); // expected-note{{candidate}} template X0(T); template X0(T*, U*); // PR4761 template X0() : f0(T::foo) {} int f0; }; void accept_X0(X0); void test_X0(int i, float f) { X0 x0a(i); X0 x0b(f); X0 x0c = i; X0 x0d = f; accept_X0(i); accept_X0(&i); accept_X0(f); accept_X0(&f); X0 x0e(&i, &f); X0 x0f(&f, &i); X0 x0g(f, &i); // expected-error{{no matching constructor}} } template struct X1 { X1(const X1&); template X1(const X1&); }; template struct Outer { typedef X1 A; A alloc; explicit Outer(const A& a) : alloc(a) { } }; void test_X1(X1 xi) { Outer oi(xi); Outer of(xi); } // PR4655 template struct A {}; template <> struct A{A(const A&);}; struct B { A x; B(B& a) : x(a.x) {} };