[clang] [llvm] [clang] Add `-verify-directives` cc1 flag (PR #179835)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 07:27:02 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 53033 tests passed
* 999 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 c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -verify -verify-directives C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-one-diag.cpp 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-one-diag.cpp
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -verify -verify-directives 'C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-one-diag.cpp'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-one-diag.cpp'
# .---command stderr------------
# | C:\_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:93: note: possible intended match here
# |  File C:\_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: C:\_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 C:\_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 C:\_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 C:\_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 C:\_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 C:\_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 C:\_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 c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -verify -verify-directives C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-wildcard.cpp 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-wildcard.cpp
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -verify -verify-directives 'C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-wildcard.cpp'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Frontend\verify-directives-wildcard.cpp'
# .---command stderr------------
# | C:\_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:93: note: possible intended match here
# |  File C:\_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: C:\_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 C:\_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 C:\_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