File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
clang/test/CXX/class/class.init/class.copy.elision Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,9 @@ void func();
96
96
97
97
struct A1 {
98
98
A1 (const A1 &);
99
- A1 (A1 &&) = delete ; // expected-note 2{{'A1' has been explicitly marked deleted here}}
99
+ A1 (A1 &&) = delete ;
100
+ // expected-note@-1 2{{'A1' has been explicitly marked deleted here}}
101
+ // cxx11_2b-note@-2 {{'A1' has been explicitly marked deleted here}}
100
102
};
101
103
void test1 () {
102
104
try {
@@ -125,6 +127,22 @@ void test3(A1 a) try {
125
127
} catch (...) {
126
128
throw a; // expected-error {{call to deleted constructor of 'test_throw_parameter::A1'}}
127
129
}
130
+
131
+ #if __cplusplus >= 201103L
132
+ namespace PR54341 {
133
+ void test4 (A1 a) {
134
+ void f (decltype ((throw a, 0 )));
135
+ // expected-warning@-1 {{has no effect}}
136
+
137
+ void g (int = decltype (throw a, 0 ){});
138
+ // expected-warning@-1 {{has no effect}}
139
+ }
140
+
141
+ void test5 (A1 a, int = decltype (throw a, 0 ){}) {}
142
+ // expected-error@-1 {{call to deleted constructor of 'test_throw_parameter::A1'}}
143
+ } // namespace PR54341
144
+ #endif
145
+
128
146
} // namespace test_throw_parameter
129
147
130
148
// During the first overload resolution, the selected function no
You can’t perform that action at this time.
0 commit comments