blob: 2e42fcc3b1cd82a849efcde9678a4c23883b8b34 [file] [log] [blame]
Fariborz Jahanian52ab92b2009-08-06 17:22:51 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
Douglas Gregorfd476482009-11-13 23:59:09 +00003struct S { // expected-note {{candidate function}}
4 S (S); // expected-error {{copy constructor must pass its first argument by reference}} \\
5 // expected-note {{candidate function}}
Fariborz Jahanian52ab92b2009-08-06 17:22:51 +00006};
7
8S f();
9
10void g() {
Douglas Gregorfd476482009-11-13 23:59:09 +000011 S a( f() ); // expected-error {{call to constructor of 'a' is ambiguous}}
Fariborz Jahanian52ab92b2009-08-06 17:22:51 +000012}
Douglas Gregorfd476482009-11-13 23:59:09 +000013