opnsense-src/test/SemaCXX/copy-constructor-error.cpp

13 lines
190 B
C++
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
2009-10-14 14:03:49 -04:00
2010-01-01 05:34:51 -05:00
struct S {
S (S); // expected-error {{copy constructor must pass its first argument by reference}}
2009-10-14 14:03:49 -04:00
};
S f();
void g() {
2010-01-01 05:34:51 -05:00
S a( f() );
2009-10-14 14:03:49 -04:00
}