Skip to content

Commit f3feecc

Browse files
committed
[clang-tidy][nfc] removed CHECK-MESSAGES-NOT and CHECK-FIXES-NOT
1 parent 60c4c04 commit f3feecc

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,16 @@ struct A {
3232
Movable GlobalObj;
3333
struct B {
3434
B(const Movable &M) : M(GlobalObj) {}
35-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
3635
Movable M;
3736
};
3837

3938
// Test that a parameter with more than one reference to it won't be changed.
4039
struct C {
4140
// Tests extra-reference in body.
4241
C(const Movable &M) : M(M) { this->i = M.a; }
43-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
4442

4543
// Tests extra-reference in init-list.
4644
C(const Movable &M, int) : M(M), i(M.a) {}
47-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
4845
Movable M;
4946
int i;
5047
};
@@ -70,7 +67,6 @@ struct E {
7067
// Test with object that can't be moved.
7168
struct F {
7269
F(const NotMovable &NM) : NM(NM) {}
73-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
7470
NotMovable NM;
7571
};
7672

@@ -112,8 +108,6 @@ struct I {
112108
// Test that templates aren't modified.
113109
template <typename T> struct J {
114110
J(const T &M) : M(M) {}
115-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
116-
// CHECK-FIXES-NOT: J(T M) : M(std::move(M)) {}
117111
T M;
118112
};
119113
J<Movable> j1(Movable());
@@ -130,14 +124,11 @@ struct MovableTemplateT
130124
template <class T>
131125
struct J2 {
132126
J2(const MovableTemplateT<T>& A);
133-
// CHECK-FIXES-NOT: J2(MovableTemplateT<T> A);
134127
MovableTemplateT<T> M;
135128
};
136129

137130
template <class T>
138131
J2<T>::J2(const MovableTemplateT<T>& A) : M(A) {}
139-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:11: warning: pass by value and use std::move
140-
// CHECK-FIXES-NOT: J2<T>::J2(MovableTemplateT<T> A) : M(std::move(A)) {}
141132
J2<int> j3(MovableTemplateT<int>{});
142133

143134
struct K_Movable {
@@ -184,7 +175,6 @@ struct O {
184175
// Test with a const-value parameter.
185176
struct P {
186177
P(const Movable M) : M(M) {}
187-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
188178
Movable M;
189179
};
190180

@@ -217,7 +207,6 @@ struct R {
217207
// Test with rvalue parameter.
218208
struct S {
219209
S(Movable &&M) : M(M) {}
220-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
221210
Movable M;
222211
};
223212

@@ -227,13 +216,11 @@ template <typename T, int N> struct array { T A[N]; };
227216
// cause problems with performance-move-const-arg, as it will revert it.
228217
struct T {
229218
T(array<int, 10> a) : a_(a) {}
230-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
231219
array<int, 10> a_;
232220
};
233221

234222
struct U {
235223
U(const POD &M) : M(M) {}
236-
// CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: pass by value and use std::move
237224
POD M;
238225
};
239226

0 commit comments

Comments
 (0)