2009-08-07 01:22:51 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
|
|
|
|
2009-11-14 07:59:09 +08:00
|
|
|
struct S { // expected-note {{candidate function}}
|
|
|
|
S (S); // expected-error {{copy constructor must pass its first argument by reference}} \\
|
|
|
|
// expected-note {{candidate function}}
|
2009-08-07 01:22:51 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
S f();
|
|
|
|
|
|
|
|
void g() {
|
2009-11-14 07:59:09 +08:00
|
|
|
S a( f() ); // expected-error {{call to constructor of 'a' is ambiguous}}
|
2009-08-07 01:22:51 +08:00
|
|
|
}
|
2009-11-14 07:59:09 +08:00
|
|
|
|