2009-08-07 01:22:51 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
|
|
|
|
2009-11-14 07:14:53 +08:00
|
|
|
struct S {
|
|
|
|
S (S); // expected-error {{copy constructor must pass its first argument by reference}}
|
2009-08-07 01:22:51 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
S f();
|
|
|
|
|
|
|
|
void g() {
|
2009-11-14 07:14:53 +08:00
|
|
|
S a( f() ); // expected-error {{no matching constructor}}
|
2009-08-07 01:22:51 +08:00
|
|
|
}
|