@@ -123,39 +123,20 @@ A &forward_rval_as_lval() {
123
123
}
124
124
125
125
struct B {};
126
- B &&(*pMove)(B&) = std::move; // #1 expected-note {{instantiation of}}
127
- B &&(*pMoveIfNoexcept)(B&) = &std::move_if_noexcept; // #2 expected-note {{instantiation of}}
128
- B &&(*pForward)(B&) = &std::forward<B>; // #3 expected-note {{instantiation of}}
129
- B &&(*pForwardLike)(B&) = &std::forward_like<int &&, B&>; // #4 expected-note {{instantiation of}}
130
- const B &(*pAsConst)(B&) = &std::as_const; // #5 expected-note {{instantiation of}}
131
- B *(*pAddressof)(B&) = &std::addressof; // #6 expected-note {{instantiation of}}
132
- B *(*pUnderUnderAddressof)(B&) = &std::__addressof; // #7 expected-note {{instantiation of}}
126
+ B &&(*pMove)(B&) = std::move; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
127
+ B &&(*pMoveIfNoexcept)(B&) = &std::move_if_noexcept; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
128
+ B &&(*pForward)(B&) = &std::forward<B>; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
129
+ B &&(*pForwardLike)(B&) = &std::forward_like<int &&, B&>; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
130
+ const B &(*pAsConst)(B&) = &std::as_const; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
131
+ B *(*pAddressof)(B&) = &std::addressof; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
132
+ B *(*pUnderUnderAddressof)(B&) = &std::__addressof; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
133
133
int (*pUnrelatedMove)(B, B) = std::move;
134
134
135
135
struct C {};
136
- C &&(&rMove)(C&) = std::move; // #8 expected-note {{instantiation of}}
137
- C &&(&rForward)(C&) = std::forward<C>; // #9 expected-note {{instantiation of}}
136
+ C &&(&rMove)(C&) = std::move; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
137
+ C &&(&rForward)(C&) = std::forward<C>; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
138
138
int (&rUnrelatedMove)(B, B) = std::move;
139
139
140
- // cxx17-warning@#1 {{non-addressable}}
141
- // cxx17-warning@#2 {{non-addressable}}
142
- // cxx17-warning@#3 {{non-addressable}}
143
- // cxx17-warning@#4 {{non-addressable}}
144
- // cxx17-warning@#5 {{non-addressable}}
145
- // cxx17-warning@#6 {{non-addressable}}
146
- // cxx17-warning@#7 {{non-addressable}}
147
- // cxx17-warning@#8 {{non-addressable}}
148
- // cxx17-warning@#9 {{non-addressable}}
149
- // cxx20-error@#1 {{non-addressable}}
150
- // cxx20-error@#2 {{non-addressable}}
151
- // cxx20-error@#3 {{non-addressable}}
152
- // cxx20-error@#4 {{non-addressable}}
153
- // cxx20-error@#5 {{non-addressable}}
154
- // cxx20-error@#6 {{non-addressable}}
155
- // cxx20-error@#7 {{non-addressable}}
156
- // cxx20-error@#8 {{non-addressable}}
157
- // cxx20-error@#9 {{non-addressable}}
158
-
159
140
void attribute_const () {
160
141
int n;
161
142
std::move (n); // expected-warning {{ignoring return value}}
@@ -173,29 +154,14 @@ struct D {
173
154
void * operator new (__SIZE_TYPE__, const D&(*)(D&));
174
155
};
175
156
176
- // cxx17-warning@#10 {{non-addressable}}
177
- // cxx17-warning@#11 {{non-addressable}}
178
- // cxx17-warning@#12 {{non-addressable}}
179
- // cxx17-warning@#13 {{non-addressable}}
180
- // cxx17-warning@#14 {{non-addressable}}
181
- // cxx17-warning@#15 {{non-addressable}}
182
- // cxx17-warning@#16 {{non-addressable}}
183
- // cxx20-error@#10 {{non-addressable}}
184
- // cxx20-error@#11 {{non-addressable}}
185
- // cxx20-error@#12 {{non-addressable}}
186
- // cxx20-error@#13 {{non-addressable}}
187
- // cxx20-error@#14 {{non-addressable}}
188
- // cxx20-error@#15 {{non-addressable}}
189
- // cxx20-error@#16 {{non-addressable}}
190
-
191
157
void placement_new () {
192
- new (std::move<D>) D; // #10 expected-note {{instantiation of}}
193
- new (std::move_if_noexcept<D>) D; // #11 expected-note {{instantiation of}}
194
- new (std::forward<D>) D; // #12 expected-note {{instantiation of}}
195
- new (std::forward_like<D>) D; // #13 expected-note {{instantiation of}}
196
- new (std::addressof<D>) D; // #14 expected-note {{instantiation of}}
197
- new (std::__addressof<D>) D; // #15 expected-note {{instantiation of}}
198
- new (std::as_const<D>) D; // #16 expected-note {{instantiation of}}
158
+ new (std::move<D>) D; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
159
+ new (std::move_if_noexcept<D>) D; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
160
+ new (std::forward<D>) D; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
161
+ new (std::forward_like<D>) D; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
162
+ new (std::addressof<D>) D; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
163
+ new (std::__addressof<D>) D; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
164
+ new (std::as_const<D>) D; // cxx17-warning {{non-addressable}} cxx20-error {{non-addressable}} expected-note {{instantiation of}}
199
165
}
200
166
201
167
namespace std {
0 commit comments