Author: Victor Chernyakin Date: 2026-05-12T12:59:00Z New Revision: de696eeb7051c0d9e4729a6f4a84fc99bb38e904
URL: https://github.com/llvm/llvm-project/commit/de696eeb7051c0d9e4729a6f4a84fc99bb38e904 DIFF: https://github.com/llvm/llvm-project/commit/de696eeb7051c0d9e4729a6f4a84fc99bb38e904.diff LOG: [clang-tidy] Run analysis even with no checks (as long as `--allow-no-checks` is passed) (#194006) Fixes #192713. Currently, clang-tidy exits immediately if the only enabled checks are `clang-diagnostic-*` ones. This prevents the reasonable use case where a user isn't interested in any "native" clang-tidy checks and just wants to use clang-tidy as a frontend for builtin clang warnings. Added: clang-tools-extra/test/clang-tidy/infrastructure/clang-diagnostic-checks-only.cpp Modified: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp clang-tools-extra/docs/ReleaseNotes.rst clang-tools-extra/test/clang-tidy/infrastructure/allow-no-checks.cpp clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/inheritance/foo.cpp clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/simple/foo.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-LIFO.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-glob.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-specific.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-at-eof.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-all.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-specific.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-multiple-end-single.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-single-end-multiple.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-all.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-glob.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-without-end.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-at-sof.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-without-begin.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-check-names.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-delims.cpp clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-typo-in-check-name.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp index f61e2f40ed03b..949a88f0fd50d 100644 --- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -718,11 +718,7 @@ int clangTidyMain(int argc, const char **argv) { return 0; } - if (EnabledChecks.empty()) { - if (AllowNoChecks) { - llvm::outs() << "No checks enabled.\n"; - return 0; - } + if (EnabledChecks.empty() && !AllowNoChecks) { llvm::errs() << "Error: no checks enabled.\n"; llvm::cl::PrintHelpMessage(/*Hidden=*/false, /*Categorized=*/true); return 1; diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 34d9d90c70a47..75ad9050787a5 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -186,6 +186,10 @@ Improvements to clang-tidy compiler. (E.g. tidy suppressed many ``clang-diagnostic-invalid-offsetof`` reports because they usually occur in expansion of the macro ``offsetof``.) +- :program:`clang-tidy` will no longer exit immediately if the only enabled + checks are `clang-diagnostic-*` ones. This allows using + :program:`clang-tidy` purely as a frontend to Clang's builtin warnings. + New checks ^^^^^^^^^^ diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/allow-no-checks.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/allow-no-checks.cpp index a1f059b92384d..677ceee75b672 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/allow-no-checks.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/allow-no-checks.cpp @@ -1,4 +1,2 @@ // RUN: not clang-tidy %s -checks='-*' -// RUN: clang-tidy %s -checks='-*' --allow-no-checks | FileCheck --match-full-lines %s - -// CHECK: No checks enabled. +// RUN: clang-tidy %s -checks='-*' --allow-no-checks -- | count 0 diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/clang-diagnostic-checks-only.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/clang-diagnostic-checks-only.cpp new file mode 100644 index 0000000000000..d3f2a11db45bd --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/infrastructure/clang-diagnostic-checks-only.cpp @@ -0,0 +1,6 @@ +// RUN: clang-tidy %s -checks='-*,clang-diagnostic-literal-conversion' --allow-no-checks -- -Wliteral-conversion | FileCheck %s + +void f() { + int i = 1.5; + // CHECK: :[[@LINE-1]]:11: warning: implicit conversion from 'double' to 'int' changes value from 1.5 to 1 [clang-diagnostic-literal-conversion] +} diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp index 3f284fc68f9f3..564cec561f27c 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp @@ -1,12 +1,11 @@ // sed command does not work as-is on Windows. // UNSUPPORTED: system-windows // RUN: sed -e "s:INPUT_DIR:%S/Inputs/custom-query-check:g" -e "s:OUT_DIR:%t:g" -e "s:MAIN_FILE:%s:g" %S/Inputs/custom-query-check/vfsoverlay.yaml > %t.yaml -// RUN: clang-tidy --allow-no-checks %t/main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s --check-prefix=CHECK -// RUN: clang-tidy --allow-no-checks %t/main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --list-checks | FileCheck %s --check-prefix=LIST-CHECK +// RUN: clang-tidy --allow-no-checks %t/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml -- | count 0 +// RUN: clang-tidy --allow-no-checks %t/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --list-checks | FileCheck %s --check-prefix=LIST-CHECK long V; -// CHECK: No checks enabled. void f(); // CHECK-SUB-DIR-APPEND: [[@LINE-1]]:1: warning: find function decl [custom-function-decl] diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp index ad225e4d14f41..10cea7458110e 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp @@ -10,7 +10,7 @@ // RUN: clang-tidy --experimental-custom-checks %t/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s --check-prefix=CHECK-SAME-DIR // RUN: clang-tidy --experimental-custom-checks %t/subdir/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s --check-prefix=CHECK-SUB-DIR-BASE // RUN: clang-tidy --experimental-custom-checks %t/subdir-override/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s --check-prefix=CHECK-SUB-DIR-OVERRIDE -// RUN: clang-tidy --experimental-custom-checks %t/subdir-empty/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --allow-no-checks | FileCheck %s --check-prefix=CHECK-SUB-DIR-EMPTY +// RUN: clang-tidy --experimental-custom-checks %t/subdir-empty/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --allow-no-checks -- | count 0 // RUN: clang-tidy --experimental-custom-checks %t/subdir-append/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s --check-prefix=CHECK-SUB-DIR-APPEND // RUN: clang-tidy --experimental-custom-checks %t/subdir-append/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --list-checks | FileCheck %s --check-prefix=LIST-CHECK // RUN: clang-tidy --experimental-custom-checks %t/subdir-append/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --dump-config | FileCheck %s --check-prefix=DUMP-CONFIG @@ -20,8 +20,7 @@ long V; // CHECK-SAME-DIR: [[@LINE-1]]:1: warning: use 'int' instead of 'long' [custom-avoid-long-type] // CHECK-SUB-DIR-BASE: [[@LINE-2]]:1: warning: use 'int' instead of 'long' [custom-avoid-long-type] // CHECK-SUB-DIR-OVERRIDE: [[@LINE-3]]:1: warning: use 'int' instead of 'long' override [custom-avoid-long-type] -// CHECK-SUB-DIR-EMPTY: No checks enabled. -// CHECK-SUB-DIR-APPEND: [[@LINE-5]]:1: warning: use 'int' instead of 'long' [custom-avoid-long-type] +// CHECK-SUB-DIR-APPEND: [[@LINE-4]]:1: warning: use 'int' instead of 'long' [custom-avoid-long-type] void f(); // CHECK-SUB-DIR-APPEND: [[@LINE-1]]:1: warning: find function decl [custom-function-decl] diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/inheritance/foo.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/inheritance/foo.cpp index 5828c2cafaf7d..79622418d6dff 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/inheritance/foo.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/inheritance/foo.cpp @@ -1,3 +1,3 @@ -// RUN: clang-tidy -checks=-*,google-explicit-constructor %s 2>&1 | FileCheck %s +// RUN: clang-tidy -checks=-*,google-explicit-constructor %s -- 2>&1 | FileCheck %s #include "foo.h" // CHECK: foo.h:1:12: warning: single-argument constructors must be marked explicit diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/simple/foo.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/simple/foo.cpp index 5828c2cafaf7d..79622418d6dff 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/simple/foo.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/simple/foo.cpp @@ -1,3 +1,3 @@ -// RUN: clang-tidy -checks=-*,google-explicit-constructor %s 2>&1 | FileCheck %s +// RUN: clang-tidy -checks=-*,google-explicit-constructor %s -- 2>&1 | FileCheck %s #include "foo.h" // CHECK: foo.h:1:12: warning: single-argument constructors must be marked explicit diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-LIFO.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-LIFO.cpp index e86b3df34fcfc..95e2f698e867e 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-LIFO.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-LIFO.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' -- 2>&1 | FileCheck %s // NOLINTBEGIN(google-explicit-constructor) // NOLINTBEGIN(modernize-avoid-c-style-cast) diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-glob.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-glob.cpp index 90b9fa9883024..4e17e809690fc 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-glob.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-glob.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s // NOLINTBEGIN class B { B(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-specific.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-specific.cpp index 6ffa914e4ef0b..07e430f4b5dab 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-specific.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-all-end-specific.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s // NOLINTBEGIN class A { A(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-at-eof.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-at-eof.cpp index 0d3dcf381eaba..860a4f9dd0ab7 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-at-eof.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-at-eof.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s // CHECK: :[[@LINE+8]]:11: warning: single-argument constructors must be marked explicit // Note: the expected output has been split over several lines so that clang-tidy diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-all.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-all.cpp index 3697d5c11e2e2..b2722071135ed 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-all.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-all.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" -- 2>&1 | FileCheck %s // NOLINTBEGIN(*) class B { B(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-specific.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-specific.cpp index 5bdb117f20242..dc282aa01424f 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-specific.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-specific.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" -- 2>&1 | FileCheck %s // NOLINTBEGIN(*) class B { B(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-multiple-end-single.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-multiple-end-single.cpp index 156a5cb345dbd..640c25d245e9b 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-multiple-end-single.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-multiple-end-single.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' -- 2>&1 | FileCheck %s // NOLINTBEGIN(google-explicit-constructor,modernize-avoid-c-style-cast) class B { B(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-single-end-multiple.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-single-end-multiple.cpp index 837213227dc2d..7de57dda9ea1d 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-single-end-multiple.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-single-end-multiple.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' -- 2>&1 | FileCheck %s // NOLINTBEGIN(google-explicit-constructor) // NOLINTBEGIN(modernize-avoid-c-style-cast) diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-all.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-all.cpp index decfe2dd5a4c1..34c431013f0fc 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-all.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-all.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" -- 2>&1 | FileCheck %s // NOLINTBEGIN(google-explicit-constructor) class A { A(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-glob.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-glob.cpp index a9f904ccce138..8e9c9c6df0a79 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-glob.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-glob.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" -- 2>&1 | FileCheck %s // NOLINTBEGIN(google-explicit-constructor) class A { A(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-without-end.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-without-end.cpp index 2cb84ae59775d..1d3a0646cf3e2 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-without-end.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-without-end.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s // NOLINTBEGIN class A { A(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-at-sof.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-at-sof.cpp index 72b8ac9256866..72d1596cac961 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-at-sof.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-at-sof.cpp @@ -9,4 +9,4 @@ class A { A(int i); }; // CHECK: TBEGIN' comment [clang-tidy-nolint] // CHECK: :[[@LINE-8]]:11: warning: single-argument constructors must be marked explicit -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-without-begin.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-without-begin.cpp index cea16610823dd..653926f8c2c1c 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-without-begin.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-end-without-begin.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s // NOLINTEND class A { A(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-check-names.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-check-names.cpp index ddd399dfc764f..e54f34646f02c 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-check-names.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-check-names.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor,modernize-avoid-c-style-cast' -- 2>&1 | FileCheck %s // NOLINTBEGIN(google-explicit-constructor) class A { A(int i); }; diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-delims.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-delims.cpp index 4b8947e369f92..b913ef03ebb28 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-delims.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-delims.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s // NOLINTBEGIN // NOLINTBEGIN diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-typo-in-check-name.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-typo-in-check-name.cpp index 57e1ff331c8ba..13580cfbea8e5 100644 --- a/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-typo-in-check-name.cpp +++ b/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-typo-in-check-name.cpp @@ -1,4 +1,4 @@ -// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' 2>&1 | FileCheck %s +// RUN: not clang-tidy %s --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s // NOLINTBEGIN(google-explicit-constructor) class A { A(int i); }; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
