[clang] [llvm] [clang] Add `-verify-directives` cc1 flag (PR #179835)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 3 07:27:01 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 86714 tests passed
* 1291 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Frontend/verify-directives-one-diag.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -verify -verify-directives /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -verify -verify-directives /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp:11:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: Line 8: diagnostic verification mode disallows use of diagnostic quantifier
# | ^
# | <stdin>:1:59: note: scanning from here
# | error: 'expected-error' diagnostics seen but not expected:
# | ^
# | <stdin>:2:115: note: possible intended match here
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp Line 8: diagnostic verification mode disallows use of a diagnostic quantifier
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: error: 'expected-error' diagnostics seen but not expected:
# | next:11'0 X~ error: no match found
# | 2: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp Line 8: diagnostic verification mode disallows use of a diagnostic quantifier
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:11'1 ? possible intended match
# | 3: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp Line 14: diagnostic verification mode disallows use of a diagnostic quantifier
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp Line 15: diagnostic verification mode disallows use of a diagnostic quantifier
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp Line 21: diagnostic verification mode disallows use of a diagnostic quantifier
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp Line 26: diagnostic verification mode disallows use of a diagnostic quantifier
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 7: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-one-diag.cpp Line 31: diagnostic verification mode disallows use of a diagnostic quantifier
# | next:11'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.Frontend/verify-directives-wildcard.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -verify -verify-directives /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -verify -verify-directives /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp:7:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: Line 4: diagnostic verification mode disallows use of wildcard for diagnostic location
# | ^
# | <stdin>:1:59: note: scanning from here
# | error: 'expected-error' diagnostics seen but not expected:
# | ^
# | <stdin>:2:115: note: possible intended match here
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp Line 4: diagnostic verification mode disallows use of a wildcard for diagnostic location
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: error: 'expected-error' diagnostics seen but not expected:
# | next:7'0 X~ error: no match found
# | 2: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp Line 4: diagnostic verification mode disallows use of a wildcard for diagnostic location
# | next:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:7'1 ? possible intended match
# | 3: File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Frontend/verify-directives-wildcard.cpp Line 10: diagnostic verification mode disallows use of a wildcard for diagnostic location
# | next:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: 2 errors generated.
# | next:7'0 ~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</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/179835
More information about the cfe-commits
mailing list