diff options
Diffstat (limited to 'clang/test/CXX/class/class.init/class.copy.elision/p3.cpp')
-rw-r--r-- | clang/test/CXX/class/class.init/class.copy.elision/p3.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp b/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp index 975557c5187b..e1a25c71c6ed 100644 --- a/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp +++ b/clang/test/CXX/class/class.init/class.copy.elision/p3.cpp @@ -11,7 +11,7 @@ struct A1 { }; A1 test1() { A1 a; - return a; // expected-error {{call to deleted constructor of 'test_delete_function::A1'}} + return a; // expected-error {{call to deleted constructor of 'A1'}} } struct A2 { @@ -34,7 +34,7 @@ struct B1 { }; B1 test3() { C c; - return c; // expected-error {{conversion function from 'test_delete_function::C' to 'test_delete_function::B1' invokes a deleted function}} + return c; // expected-error {{conversion function from 'C' to 'B1' invokes a deleted function}} } struct B2 { @@ -75,7 +75,7 @@ struct B1 { B1(B1 &&) = delete; // expected-note {{'B1' has been explicitly marked deleted here}} }; B1 test3(B1 &&b) { - return b; // expected-error {{call to deleted constructor of 'test_implicitly_movable_rvalue_ref::B1'}} + return b; // expected-error {{call to deleted constructor of 'B1'}} } struct B2 { @@ -104,7 +104,7 @@ void test1() { try { func(); } catch (A1 a) { - throw a; // expected-error {{call to deleted constructor of 'test_throw_parameter::A1'}} + throw a; // expected-error {{call to deleted constructor of 'A1'}} } } @@ -125,21 +125,21 @@ void test2() { void test3(A1 a) try { func(); } catch (...) { - throw a; // expected-error {{call to deleted constructor of 'test_throw_parameter::A1'}} + throw a; // expected-error {{call to deleted constructor of 'A1'}} } #if __cplusplus >= 201103L namespace PR54341 { void test4(A1 a) { void f(decltype((throw a, 0))); - // expected-error@-1 {{call to deleted constructor of 'test_throw_parameter::A1'}} + // expected-error@-1 {{call to deleted constructor of 'A1'}} void g(int = decltype(throw a, 0){}); - // expected-error@-1 {{call to deleted constructor of 'test_throw_parameter::A1'}} + // expected-error@-1 {{call to deleted constructor of 'A1'}} } void test5(A1 a, int = decltype(throw a, 0){}) {} -// expected-error@-1 {{call to deleted constructor of 'test_throw_parameter::A1'}} +// expected-error@-1 {{call to deleted constructor of 'A1'}} } // namespace PR54341 #endif @@ -176,7 +176,7 @@ struct B1 { }; C test3() { B1 b; - return b; // expected-error {{conversion function from 'test_non_ctor_conversion::B1' to 'test_non_ctor_conversion::C' invokes a deleted function}} + return b; // expected-error {{conversion function from 'B1' to 'C' invokes a deleted function}} } struct B2 { @@ -274,20 +274,20 @@ NeedValue test_3_1() { // not rvalue reference // same type B1 b; - return b; // cxx11_2b-error {{call to deleted constructor of 'test_ctor_param_rvalue_ref::B1'}} + return b; // cxx11_2b-error {{call to deleted constructor of 'B1'}} } class DerivedB1 : public B1 {}; B1 test_3_2() { // rvalue reference // not same type DerivedB1 b; - return b; // expected-error {{call to deleted constructor of 'test_ctor_param_rvalue_ref::B1'}} + return b; // expected-error {{call to deleted constructor of 'B1'}} } NeedValue test_3_3() { // not rvalue reference // not same type DerivedB1 b; - return b; // cxx11_2b-error {{call to deleted constructor of 'test_ctor_param_rvalue_ref::B1'}} + return b; // cxx11_2b-error {{call to deleted constructor of 'B1'}} } struct B2 { |