Skip to content

Commit 6db5fc6

Browse files
committed
[Clang] [NFC] Reorder expected directives
1 parent 1526568 commit 6db5fc6

File tree

1 file changed

+16
-50
lines changed

1 file changed

+16
-50
lines changed

clang/test/SemaCXX/builtin-std-move.cpp

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -123,39 +123,20 @@ A &forward_rval_as_lval() {
123123
}
124124

125125
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}}
133133
int (*pUnrelatedMove)(B, B) = std::move;
134134

135135
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}}
138138
int (&rUnrelatedMove)(B, B) = std::move;
139139

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-
159140
void attribute_const() {
160141
int n;
161142
std::move(n); // expected-warning {{ignoring return value}}
@@ -173,29 +154,14 @@ struct D {
173154
void* operator new(__SIZE_TYPE__, const D&(*)(D&));
174155
};
175156

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-
191157
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}}
199165
}
200166

201167
namespace std {

0 commit comments

Comments
 (0)