Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 52ab92b | 2009-08-06 17:22:51 +0000 | [diff] [blame] | 2 | |
Douglas Gregor | fd47648 | 2009-11-13 23:59:09 +0000 | [diff] [blame] | 3 | struct 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 Jahanian | 52ab92b | 2009-08-06 17:22:51 +0000 | [diff] [blame] | 6 | }; |
| 7 | |
| 8 | S f(); |
| 9 | |
| 10 | void g() { |
Douglas Gregor | fd47648 | 2009-11-13 23:59:09 +0000 | [diff] [blame] | 11 | S a( f() ); // expected-error {{call to constructor of 'a' is ambiguous}} |
Fariborz Jahanian | 52ab92b | 2009-08-06 17:22:51 +0000 | [diff] [blame] | 12 | } |
Douglas Gregor | fd47648 | 2009-11-13 23:59:09 +0000 | [diff] [blame] | 13 | |