// RUN: clang-cc -fsyntax-only -verify %s // Make sure that copy constructors and assignment operators are properly // generated when there is a matching // PR5072 template struct X { template X(const X& other) : value(other.value + 1) { } // expected-error{{binary expression}} template X& operator=(const X& other) { value = other.value + 1; // expected-error{{binary expression}} return *this; } T value; }; struct Y {}; X test0(X x) { return x; } X test1(X x) { return x; } X test2(X x) { return x; // expected-note{{instantiation}} } void test3(X &x, X xi, X xl, X xmptr) { x = xi; x = xl; x = xmptr; // expected-note{{instantiation}} }