[clang-tools-extra] [clang-tidy] Run analysis even with no checks (as long as `--allow-no-checks` is passed) (PR #194006)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 24 09:48:34 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 3219 tests passed
* 7 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/infrastructure/custom-query-check-not-enable.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 3
sed -e "s:INPUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check:g" -e "s:OUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp:g" -e "s:MAIN_FILE:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp:g" /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check/vfsoverlay.yaml > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp.yaml
# executed command: sed -e s:INPUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check:g -e s:OUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp:g -e s:MAIN_FILE:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp:g /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check/vfsoverlay.yaml
# note: command had no output on stdout or stderr
# RUN: at line 4
clang-tidy --allow-no-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp/main.cpp -checks='-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp.yaml | count 0
# executed command: clang-tidy --allow-no-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp/main.cpp '-checks=-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp.yaml
# .---command stderr------------
# | Error while processing /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check-not-enable.cpp.tmp/main.cpp.
# | Found compiler error(s).
# `-----------------------------
# error: command failed with exit status: 1
# executed command: count 0
# .---command stderr------------
# | Expected 0 lines, got 3.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang Tools.clang-tidy/infrastructure/custom-query-check.cpp</summary>
```
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 7
sed -e "s:INPUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check:g" -e "s:OUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp:g" -e "s:MAIN_FILE:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp:g" /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check/vfsoverlay.yaml > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml
# executed command: sed -e s:INPUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check:g -e s:OUT_DIR:/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp:g -e s:MAIN_FILE:/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp:g /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/Inputs/custom-query-check/vfsoverlay.yaml
# note: command had no output on stdout or stderr
# RUN: at line 8
mkdir -p /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp
# executed command: mkdir -p /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 9
echo '[{"file": "cqc-main.cpp", "directory": "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp", "command": "clang++ -c cqc-main.cpp"}]' > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/compile_commands.json
# executed command: echo '[{"file": "cqc-main.cpp", "directory": "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp", "command": "clang++ -c cqc-main.cpp"}]'
# note: command had no output on stdout or stderr
# RUN: at line 10
clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SAME-DIR
# executed command: clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/cqc-main.cpp '-checks=-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml
# .---command stderr------------
# | 1 warning generated.
# `-----------------------------
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SAME-DIR
# note: command had no output on stdout or stderr
# RUN: at line 11
clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/subdir/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SUB-DIR-BASE
# executed command: clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/subdir/cqc-main.cpp '-checks=-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml
# .---command stderr------------
# | 1 warning generated.
# `-----------------------------
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SUB-DIR-BASE
# note: command had no output on stdout or stderr
# RUN: at line 12
clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/subdir-override/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SUB-DIR-OVERRIDE
# executed command: clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/subdir-override/cqc-main.cpp '-checks=-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml
# .---command stderr------------
# | 1 warning generated.
# `-----------------------------
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SUB-DIR-OVERRIDE
# note: command had no output on stdout or stderr
# RUN: at line 13
clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/subdir-empty/cqc-main.cpp -checks='-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml --allow-no-checks | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SUB-DIR-EMPTY
# executed command: clang-tidy --experimental-custom-checks /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp/subdir-empty/cqc-main.cpp '-checks=-*,custom-*' -vfsoverlay /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/custom-query-check.cpp.tmp.yaml --allow-no-checks
# note: command had no output on stdout or stderr
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SUB-DIR-EMPTY
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp --check-prefix=CHECK-SUB-DIR-EMPTY
# `-----------------------------
# error: command failed with exit status: 2
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/194006
More information about the cfe-commits
mailing list