Skip to content

Commit 15750a0

Browse files
authored
[clang-tidy] Use --match-full-lines instead of --strict-whitespace in check_clang_tidy (llvm#133756)
See Discourse post here: https://discourse.llvm.org/t/rfc-using-match-full-lines-in-clang-tidy-tests/85553 I've added `--match-partial-fixes` to all tests that were failing, unless I noticed the fix was quick and trivial.
1 parent 9222607 commit 15750a0

File tree

97 files changed

+164
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+164
-146
lines changed

clang-tools-extra/docs/ReleaseNotes.rst

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ Improvements to clang-query
9191
Improvements to clang-tidy
9292
--------------------------
9393

94+
- Changed the :program:`check_clang_tidy.py` tool to use FileCheck's
95+
``--match-full-lines`` instead of ``strict-whitespace`` for ``CHECK-FIXES``
96+
clauses. Added a ``--match-partial-fixes`` option to keep previous behavior on
97+
specific tests. This may break tests for users with custom out-of-tree checks
98+
who use :program:`check_clang_tidy.py` as-is.
99+
94100
- Improved :program:`clang-tidy-diff.py` script. Add the `-warnings-as-errors`
95101
argument to treat warnings as errors.
96102

clang-tools-extra/test/clang-tidy/check_clang_tidy.py

+13-3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def __init__(self, args: argparse.Namespace, extra_args: List[str]) -> None:
105105
self.fixes = MessagePrefix("CHECK-FIXES")
106106
self.messages = MessagePrefix("CHECK-MESSAGES")
107107
self.notes = MessagePrefix("CHECK-NOTES")
108+
self.match_partial_fixes = args.match_partial_fixes
108109

109110
file_name_with_extension = self.assume_file_name or self.input_file_name
110111
_, extension = os.path.splitext(file_name_with_extension)
@@ -248,10 +249,14 @@ def check_fixes(self) -> None:
248249
try_run(
249250
[
250251
"FileCheck",
251-
"-input-file=" + self.temp_file_name,
252+
"--input-file=" + self.temp_file_name,
252253
self.input_file_name,
253-
"-check-prefixes=" + ",".join(self.fixes.prefixes),
254-
"-strict-whitespace",
254+
"--check-prefixes=" + ",".join(self.fixes.prefixes),
255+
(
256+
"--match-full-lines"
257+
if not self.match_partial_fixes
258+
else "--strict-whitespace" # Keeping past behavior.
259+
),
255260
]
256261
)
257262

@@ -372,6 +377,11 @@ def parse_arguments() -> Tuple[argparse.Namespace, List[str]]:
372377
default=["c++11-or-later"],
373378
help="Passed to clang. Special -or-later values are expanded.",
374379
)
380+
parser.add_argument(
381+
"--match-partial-fixes",
382+
action="store_true",
383+
help="allow partial line matches for fixes",
384+
)
375385
return parser.parse_known_args()
376386

377387

clang-tools-extra/test/clang-tidy/checkers/abseil/duration-addition.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-duration-addition %t -- -- -I%S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-duration-addition %t -- -- -I%S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/duration-comparison.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-duration-comparison %t -- -- -I%S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-duration-comparison %t -- -- -I%S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/duration-conversion-cast.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-duration-conversion-cast %t -- -- -I%S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-duration-conversion-cast %t -- -- -I%S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/duration-factory-float.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-duration-factory-float %t -- -- -I%S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-duration-factory-float %t -- -- -I%S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/duration-factory-scale.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-duration-factory-scale %t -- -- -I%S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-duration-factory-scale %t -- -- -I%S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/duration-subtraction.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-duration-subtraction %t -- -- -I %S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-duration-subtraction %t -- -- -I %S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/duration-unnecessary-conversion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++11-or-later %s abseil-duration-unnecessary-conversion %t -- -- -I %S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes -std=c++11-or-later %s abseil-duration-unnecessary-conversion %t -- -- -I %S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/redundant-strcat-calls.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-redundant-strcat-calls %t -- -- -isystem %clang_tidy_headers
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-redundant-strcat-calls %t -- -- -isystem %clang_tidy_headers
22
#include <string>
33

44
namespace absl {

clang-tools-extra/test/clang-tidy/checkers/abseil/time-comparison.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s abseil-time-comparison %t -- -- -I%S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes %s abseil-time-comparison %t -- -- -I%S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/time-subtraction.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++11-or-later %s abseil-time-subtraction %t -- -- -I %S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes -std=c++11-or-later %s abseil-time-subtraction %t -- -- -I %S/Inputs
22

33
#include "absl/time/time.h"
44

clang-tools-extra/test/clang-tidy/checkers/abseil/upgrade-duration-conversions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++11-or-later %s abseil-upgrade-duration-conversions %t -- -- -I%S/Inputs
1+
// RUN: %check_clang_tidy --match-partial-fixes -std=c++11-or-later %s abseil-upgrade-duration-conversions %t -- -- -I%S/Inputs
22

33
using int64_t = long long;
44

clang-tools-extra/test/clang-tidy/checkers/altera/struct-pack-align.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s altera-struct-pack-align %t -- -header-filter=.*
1+
// RUN: %check_clang_tidy --match-partial-fixes %s altera-struct-pack-align %t -- -header-filter=.*
22

33
// Struct needs both alignment and packing
44
struct error {

clang-tools-extra/test/clang-tidy/checkers/android/cloexec-memfd-create.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s android-cloexec-memfd-create %t
1+
// RUN: %check_clang_tidy --match-partial-fixes %s android-cloexec-memfd-create %t
22

33
#define MFD_ALLOW_SEALING 1
44
#define __O_CLOEXEC 3

clang-tools-extra/test/clang-tidy/checkers/android/cloexec-open.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s android-cloexec-open %t
1+
// RUN: %check_clang_tidy --match-partial-fixes %s android-cloexec-open %t
22

33
#define O_RDWR 1
44
#define O_EXCL 2

clang-tools-extra/test/clang-tidy/checkers/android/cloexec-socket.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s android-cloexec-socket %t
1+
// RUN: %check_clang_tidy --match-partial-fixes %s android-cloexec-socket %t
22

33
#define SOCK_STREAM 1
44
#define SOCK_DGRAM 2

clang-tools-extra/test/clang-tidy/checkers/bugprone/incorrect-enable-shared-from-this.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-incorrect-enable-shared-from-this %t
1+
// RUN: %check_clang_tidy --match-partial-fixes -std=c++11-or-later %s bugprone-incorrect-enable-shared-from-this %t
22

33
// NOLINTBEGIN
44
namespace std {

clang-tools-extra/test/clang-tidy/checkers/bugprone/move-forwarding-reference.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++14-or-later %s bugprone-move-forwarding-reference %t -- -- -fno-delayed-template-parsing
1+
// RUN: %check_clang_tidy --match-partial-fixes -std=c++14-or-later %s bugprone-move-forwarding-reference %t -- -- -fno-delayed-template-parsing
22

33
namespace std {
44
template <typename> struct remove_reference;

clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-in-initialization-strlen.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-not-null-terminated-result %t -- \
22
// RUN: -- -std=c11 -I %S/Inputs/not-null-terminated-result
33

44
#include "not-null-terminated-result-c.h"

clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-memcpy-safe-cxx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-not-null-terminated-result %t -- \
22
// RUN: -- -std=c++11 -I %S/Inputs/not-null-terminated-result
33

44
#include "not-null-terminated-result-cxx.h"

clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-strlen.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-not-null-terminated-result %t -- \
22
// RUN: -- -std=c11 -I %S/Inputs/not-null-terminated-result
33

44
// FIXME: Something wrong with the APInt un/signed conversion on Windows:

clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-wcslen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-not-null-terminated-result %t -- \
22
// RUN: -- -std=c++11 -I %S/Inputs/not-null-terminated-result
33

44
// FIXME: Something wrong with the APInt un/signed conversion on Windows:

clang-tools-extra/test/clang-tidy/checkers/bugprone/posix-return.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-posix-return %t
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-posix-return %t
22

33
#define NULL nullptr
44
#define ZERO 0

clang-tools-extra/test/clang-tidy/checkers/bugprone/standalone-empty.cpp

+22-22
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ bool test_member_empty() {
176176
std::vector_with_clear<int> v;
177177
v.empty();
178178
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
179-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
179+
// CHECK-FIXES: v.clear();
180180
}
181181

182182
{
183183
std::vector_with_int_empty<int> v;
184184
v.empty();
185185
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
186-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
186+
// CHECK-FIXES: v.clear();
187187
}
188188

189189
{
@@ -214,14 +214,14 @@ bool test_member_empty() {
214214
absl::string_with_clear s;
215215
s.empty();
216216
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
217-
// CHECK-FIXES: {{^ }} s.clear();{{$}}
217+
// CHECK-FIXES: s.clear();
218218
}
219219

220220
{
221221
absl::string_with_int_empty s;
222222
s.empty();
223223
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
224-
// CHECK-FIXES: {{^ }} s.clear();{{$}}
224+
// CHECK-FIXES: s.clear();
225225
}
226226

227227
{
@@ -302,11 +302,11 @@ bool test_qualified_empty() {
302302
absl::string_with_clear v;
303303
std::empty(v);
304304
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'std::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
305-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
305+
// CHECK-FIXES: v.clear();
306306

307307
absl::empty(v);
308308
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'absl::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
309-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
309+
// CHECK-FIXES: v.clear();
310310

311311
test::empty(v);
312312
// no-warning
@@ -361,21 +361,21 @@ bool test_unqualified_empty() {
361361
std::vector_with_void_empty<int> v;
362362
empty(v);
363363
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'std::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
364-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
364+
// CHECK-FIXES: v.clear();
365365
}
366366

367367
{
368368
std::vector_with_clear<int> v;
369369
empty(v);
370370
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'std::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
371-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
371+
// CHECK-FIXES: v.clear();
372372
}
373373

374374
{
375375
std::vector_with_int_empty<int> v;
376376
empty(v);
377377
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'std::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
378-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
378+
// CHECK-FIXES: v.clear();
379379
}
380380

381381
{
@@ -400,21 +400,21 @@ bool test_unqualified_empty() {
400400
absl::string_with_void_empty s;
401401
empty(s);
402402
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'absl::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
403-
// CHECK-FIXES: {{^ }} s.clear();{{$}}
403+
// CHECK-FIXES: s.clear();
404404
}
405405

406406
{
407407
absl::string_with_clear s;
408408
empty(s);
409409
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'absl::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
410-
// CHECK-FIXES: {{^ }} s.clear();{{$}}
410+
// CHECK-FIXES: s.clear();
411411
}
412412

413413
{
414414
absl::string_with_int_empty s;
415415
empty(s);
416416
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'absl::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
417-
// CHECK-FIXES: {{^ }} s.clear();{{$}}
417+
// CHECK-FIXES: s.clear();
418418
}
419419

420420
{
@@ -441,7 +441,7 @@ bool test_unqualified_empty() {
441441
using std::empty;
442442
empty(v);
443443
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'std::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
444-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
444+
// CHECK-FIXES: v.clear();
445445
}
446446

447447
{
@@ -456,7 +456,7 @@ bool test_unqualified_empty() {
456456
using absl::empty;
457457
empty(s);
458458
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'absl::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
459-
// CHECK-FIXES: {{^ }} s.clear();{{$}}
459+
// CHECK-FIXES: s.clear();
460460
}
461461

462462
{
@@ -637,14 +637,14 @@ bool test_clear_in_base_class() {
637637
base::vector<int> v;
638638
v.empty();
639639
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
640-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
640+
// CHECK-FIXES: v.clear();
641641
}
642642

643643
{
644644
base::vector_non_dependent<int> v;
645645
v.empty();
646646
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
647-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
647+
// CHECK-FIXES: v.clear();
648648
}
649649

650650
{
@@ -663,14 +663,14 @@ bool test_clear_in_base_class() {
663663
base::vector<int> v;
664664
empty(v);
665665
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'base::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
666-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
666+
// CHECK-FIXES: v.clear();
667667
}
668668

669669
{
670670
base::vector_non_dependent<int> v;
671671
empty(v);
672672
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'base::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
673-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
673+
// CHECK-FIXES: v.clear();
674674
}
675675

676676
{
@@ -775,14 +775,14 @@ bool test_clear_with_qualifiers() {
775775
qualifiers::vector_with_volatile_clear<int> v;
776776
v.empty();
777777
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
778-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
778+
// CHECK-FIXES: v.clear();
779779
}
780780

781781
{
782782
volatile qualifiers::vector_with_volatile_clear<int> v;
783783
v.empty();
784784
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'empty()'; did you mean 'clear()'? [bugprone-standalone-empty]
785-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
785+
// CHECK-FIXES: v.clear();
786786
}
787787

788788
{
@@ -795,14 +795,14 @@ bool test_clear_with_qualifiers() {
795795
qualifiers::vector_with_volatile_clear<int> v;
796796
empty(v);
797797
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'qualifiers::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
798-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
798+
// CHECK-FIXES: v.clear();
799799
}
800800

801801
{
802802
volatile qualifiers::vector_with_volatile_clear<int> v;
803803
empty(v);
804804
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: ignoring the result of 'qualifiers::empty'; did you mean 'clear()'? [bugprone-standalone-empty]
805-
// CHECK-FIXES: {{^ }} v.clear();{{$}}
805+
// CHECK-FIXES: v.clear();
806806
}
807807

808808
{

clang-tools-extra/test/clang-tidy/checkers/bugprone/stringview-nullptr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-stringview-nullptr -std=c++17 %t
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-stringview-nullptr -std=c++17 %t
22

33
namespace std {
44

clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-string-compare.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-suspicious-string-compare %t -- \
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-suspicious-string-compare %t -- \
22
// RUN: -config='{CheckOptions: \
33
// RUN: {bugprone-suspicious-string-compare.WarnOnImplicitComparison: true, \
44
// RUN: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison: true}}' \

clang-tools-extra/test/clang-tidy/checkers/bugprone/swapped-arguments.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s bugprone-swapped-arguments %t
1+
// RUN: %check_clang_tidy --match-partial-fixes %s bugprone-swapped-arguments %t
22

33
void F(int, double);
44

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/prefer-member-initializer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s cppcoreguidelines-prefer-member-initializer %t -- -- -fcxx-exceptions
1+
// RUN: %check_clang_tidy --match-partial-fixes %s cppcoreguidelines-prefer-member-initializer %t -- -- -fcxx-exceptions
22

33
extern void __assert_fail (__const char *__assertion, __const char *__file,
44
unsigned int __line, __const char *__function)

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-bounds-constant-array-index.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy %s cppcoreguidelines-pro-bounds-constant-array-index %t
1+
// RUN: %check_clang_tidy --match-partial-fixes %s cppcoreguidelines-pro-bounds-constant-array-index %t
22

33
typedef __SIZE_TYPE__ size_t;
44

0 commit comments

Comments
 (0)