Skip to content

Commit 08a8c94

Browse files
committed
Don't touch CHECK-NOTES or CHECK-MESSAGES
1 parent 8c69ca3 commit 08a8c94

File tree

4 files changed

+231
-231
lines changed

4 files changed

+231
-231
lines changed

clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-implicits.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ void numericConversion1(int I, double D) { numericConversion1(D, I); }
3030
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion1' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters]
3131
// CHECK-MESSAGES: :[[@LINE-2]]:29: note: the first parameter in the range is 'I'
3232
// CHECK-MESSAGES: :[[@LINE-3]]:39: note: the last parameter in the range is 'D'
33-
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'double' may be implicitly converted
33+
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'double' may be implicitly converted{{$}}
3434

3535
void numericConversion2(int I, short S) { numericConversion2(S, I); }
3636
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion2' of convertible types
3737
// CHECK-MESSAGES: :[[@LINE-2]]:29: note: the first parameter in the range is 'I'
3838
// CHECK-MESSAGES: :[[@LINE-3]]:38: note: the last parameter in the range is 'S'
39-
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'short' may be implicitly converted
39+
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'short' may be implicitly converted{{$}}
4040

4141
void numericConversion3(float F, unsigned long UL) { numericConversion3(UL, F); }
4242
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion3' of convertible types
4343
// CHECK-MESSAGES: :[[@LINE-2]]:31: note: the first parameter in the range is 'F'
4444
// CHECK-MESSAGES: :[[@LINE-3]]:48: note: the last parameter in the range is 'UL'
45-
// CHECK-MESSAGES: :[[@LINE-4]]:34: note: 'float' and 'unsigned long' may be implicitly converted
45+
// CHECK-MESSAGES: :[[@LINE-4]]:34: note: 'float' and 'unsigned long' may be implicitly converted{{$}}
4646

4747
enum Unscoped { U_A,
4848
U_B };
@@ -53,25 +53,25 @@ void numericConversion4(int I, enum Unscoped U) { numericConversion4(U, I); }
5353
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion4' of convertible types
5454
// CHECK-MESSAGES: :[[@LINE-2]]:29: note: the first parameter in the range is 'I'
5555
// CHECK-MESSAGES: :[[@LINE-3]]:46: note: the last parameter in the range is 'U'
56-
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'enum Unscoped' may be implicitly converted
56+
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'enum Unscoped' may be implicitly converted{{$}}
5757

5858
void numericConversion5(int I, enum UnscopedFixed UF) { numericConversion5(UF, I); }
5959
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion5' of convertible types
6060
// CHECK-MESSAGES: :[[@LINE-2]]:29: note: the first parameter in the range is 'I'
6161
// CHECK-MESSAGES: :[[@LINE-3]]:51: note: the last parameter in the range is 'UF'
62-
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'enum UnscopedFixed' may be implicitly converted
62+
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'enum UnscopedFixed' may be implicitly converted{{$}}
6363

6464
void numericConversion7(double D, enum Unscoped U) { numericConversion7(U, D); }
6565
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion7' of convertible types
6666
// CHECK-MESSAGES: :[[@LINE-2]]:32: note: the first parameter in the range is 'D'
6767
// CHECK-MESSAGES: :[[@LINE-3]]:49: note: the last parameter in the range is 'U'
68-
// CHECK-MESSAGES: :[[@LINE-4]]:35: note: 'double' and 'enum Unscoped' may be implicitly converted
68+
// CHECK-MESSAGES: :[[@LINE-4]]:35: note: 'double' and 'enum Unscoped' may be implicitly converted{{$}}
6969

7070
void numericConversion8(double D, enum UnscopedFixed UF) { numericConversion8(UF, D); }
7171
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion8' of convertible types
7272
// CHECK-MESSAGES: :[[@LINE-2]]:32: note: the first parameter in the range is 'D'
7373
// CHECK-MESSAGES: :[[@LINE-3]]:54: note: the last parameter in the range is 'UF'
74-
// CHECK-MESSAGES: :[[@LINE-4]]:35: note: 'double' and 'enum UnscopedFixed' may be implicitly converted
74+
// CHECK-MESSAGES: :[[@LINE-4]]:35: note: 'double' and 'enum UnscopedFixed' may be implicitly converted{{$}}
7575

7676
void pointeeConversion(int *IP, double *DP) { pointeeConversion(DP, IP); }
7777
// NO-WARN: Even though this is possible in C, a swap is diagnosed by the compiler.

clang-tools-extra/test/clang-tidy/checkers/bugprone/easily-swappable-parameters-implicits.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ void numericConversion1(int I, double D) { numericConversion1(D, I); }
7474
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion1' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters]
7575
// CHECK-MESSAGES: :[[@LINE-2]]:29: note: the first parameter in the range is 'I'
7676
// CHECK-MESSAGES: :[[@LINE-3]]:39: note: the last parameter in the range is 'D'
77-
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'double' may be implicitly converted
77+
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'double' may be implicitly converted{{$}}
7878

7979
void numericConversion2(int I, short S) { numericConversion2(S, I); }
8080
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion2' of convertible types
8181
// CHECK-MESSAGES: :[[@LINE-2]]:29: note: the first parameter in the range is 'I'
8282
// CHECK-MESSAGES: :[[@LINE-3]]:38: note: the last parameter in the range is 'S'
83-
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'short' may be implicitly converted
83+
// CHECK-MESSAGES: :[[@LINE-4]]:32: note: 'int' and 'short' may be implicitly converted{{$}}
8484

8585
void numericConversion3(float F, unsigned long long ULL) { numericConversion3(ULL, F); }
8686
// CHECK-MESSAGES: :[[@LINE-1]]:25: warning: 2 adjacent parameters of 'numericConversion3' of convertible types
8787
// CHECK-MESSAGES: :[[@LINE-2]]:31: note: the first parameter in the range is 'F'
8888
// CHECK-MESSAGES: :[[@LINE-3]]:53: note: the last parameter in the range is 'ULL'
89-
// CHECK-MESSAGES: :[[@LINE-4]]:34: note: 'float' and 'unsigned long long' may be implicitly converted
89+
// CHECK-MESSAGES: :[[@LINE-4]]:34: note: 'float' and 'unsigned long long' may be implicitly converted{{$}}
9090

9191
enum Unscoped { U_A,
9292
U_B };
@@ -111,7 +111,7 @@ void numericConversionMultiUnique(int I, double D1, double D2) {}
111111
// CHECK-MESSAGES: :[[@LINE-1]]:35: warning: 3 adjacent parameters of 'numericConversionMultiUnique' of convertible types
112112
// CHECK-MESSAGES: :[[@LINE-2]]:39: note: the first parameter in the range is 'I'
113113
// CHECK-MESSAGES: :[[@LINE-3]]:60: note: the last parameter in the range is 'D2'
114-
// CHECK-MESSAGES: :[[@LINE-4]]:42: note: 'int' and 'double' may be implicitly converted
114+
// CHECK-MESSAGES: :[[@LINE-4]]:42: note: 'int' and 'double' may be implicitly converted{{$}}
115115
// (Note: int<->double conversion for I<->D2 not diagnosed again.)
116116

117117
typedef int MyInt;
@@ -176,7 +176,7 @@ void userDefinedConversion1(int I1, Integer I2) { userDefinedConversion1(I2, I1)
176176
// CHECK-MESSAGES: :[[@LINE-1]]:29: warning: 2 adjacent parameters of 'userDefinedConversion1' of convertible types
177177
// CHECK-MESSAGES: :[[@LINE-2]]:33: note: the first parameter in the range is 'I1'
178178
// CHECK-MESSAGES: :[[@LINE-3]]:45: note: the last parameter in the range is 'I2'
179-
// CHECK-MESSAGES: :[[@LINE-4]]:37: note: 'int' and 'Integer' may be implicitly converted
179+
// CHECK-MESSAGES: :[[@LINE-4]]:37: note: 'int' and 'Integer' may be implicitly converted{{$}}
180180
// CHECK-MESSAGES: :[[@LINE-9]]:3: note: the implicit conversion involves the converting constructor declared here
181181
// CHECK-MESSAGES: :[[@LINE-9]]:3: note: the implicit conversion involves the conversion operator declared here
182182

0 commit comments

Comments
 (0)