[clang-tools-extra] added option `llvm-header-guard.HeaderDirs` (PR #176940)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 21 04:33:33 PST 2026


github-actions[bot] wrote:

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

* 3022 tests passed
* 29 tests skipped
* 8 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/header-guard/include/correct.hpp</summary>

```
Test has no 'RUN:' line
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/header-guard/include/missing.hpp</summary>

```
Test has no 'RUN:' line
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/header-guard/include/wrong.hpp</summary>

```
Test has no 'RUN:' line
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/header-guard/other/correct.hpp</summary>

```
Test has no 'RUN:' line
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/header-guard/other/missing.hpp</summary>

```
Test has no 'RUN:' line
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/header-guard/other/wrong.hpp</summary>

```
Test has no 'RUN:' line
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/llvm/header-guard.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 12
C:/Python312/python.exe C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp llvm-header-guard C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp -export-fixes=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.yaml --header-filter=.* -- -IC:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm > C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.msg 2>&1
# executed command: C:/Python312/python.exe 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py' 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp' llvm-header-guard 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp' '-export-fixes=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.yaml' '--header-filter=.*' -- '-IC:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm'
# note: command had no output on stdout or stderr
# RUN: at line 13
FileCheck -input-file=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.msg -check-prefix=CHECK-MESSAGES1 C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp
# executed command: FileCheck '-input-file=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.msg' -check-prefix=CHECK-MESSAGES1 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 14
FileCheck -input-file=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.yaml -check-prefix=CHECK-YAML1 C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp
# executed command: FileCheck '-input-file=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.yaml' -check-prefix=CHECK-YAML1 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp:22:17: error: CHECK-YAML1: expected string not found in input
# | // CHECK-YAML1: FilePath: '{{.*}}/header-guard/include/missing.hpp'
# |                 ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.yaml:6:41: note: scanning from here
# |  Message: header is missing header guard
# |                                         ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.yaml:7:84: note: possible intended match here
# |  FilePath: 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard/include/missing.hpp'
# |                                                                                    ^
# | 
# | Input file: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.1.yaml
# | Check file: C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: --- 
# |             2: MainSourceFile: 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\llvm\Output\header-guard.cpp.tmp.cpp' 
# |             3: Diagnostics: 
# |             4:  - DiagnosticName: llvm-header-guard 
# |             5:  DiagnosticMessage: 
# |             6:  Message: header is missing header guard 
# | check:22'0                                             X error: no match found
# |             7:  FilePath: 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard/include/missing.hpp' 
# | check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:22'1                                                                                        ?                                              possible intended match
# |             8:  FileOffset: 0 
# | check:22'0     ~~~~~~~~~~~~~~~
# |             9:  Replacements: 
# | check:22'0     ~~~~~~~~~~~~~~~
# |            10:  - FilePath: 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\llvm\header-guard/include/missing.hpp' 
# | check:22'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            11:  Offset: 0 
# | check:22'0     ~~~~~~~~~~~
# |            12:  Length: 0 
# | check:22'0     ~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang Tools.clang-tidy/infrastructure/alphabetical-order.test</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
C:/Python312/python.exe C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst'
# note: command had no output on stdout or stderr
# RUN: at line 2
diff --strip-trailing-cr C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.rst C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.rst' 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.rst'
# note: command had no output on stdout or stderr
# RUN: at line 4
C:/Python312/python.exe C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst'
# .---command stderr------------
# | 
# | Entries in 'clang-tools-extra/docs/ReleaseNotes.rst' are not alphabetically sorted.
# | Fix the ordering by applying diff printed below.
# | 
# `-----------------------------
# RUN: at line 5
diff --strip-trailing-cr C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.rst C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.rst' 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst'
# .---command stdout------------
# | *** C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.rst
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.rst
# | ***************
# | *** 114,122 ****
# |     - Added support for analyzing function parameters with the `AnalyzeParameters`
# |       option.
# |   
# | - - Improved :doc:`llvm-header-guard <clang-tidy/checks/llvm/header-guard>` check
# | -   by adding the option `HeaderDirs` to configure header directory names.
# | - 
# |   - Improved :doc:`modernize-use-std-format
# |     <clang-tidy/checks/modernize/use-std-format>` check by fixing a crash
# |     when an argument is part of a macro expansion.
# | --- 114,119 ----
# | ***************
# | *** 133,138 ****
# | --- 130,138 ----
# |     <clang-tidy/checks/readability/enum-initial-value>` check: the warning message
# |     now uses separate note diagnostics for each uninitialized enumerator, making
# |     it easier to see which specific enumerators need explicit initialization.
# | + 
# | + - Improved :doc:`llvm-header-guard <clang-tidy/checks/llvm/header-guard>` check
# | +   by adding the option `HeaderDirs` to configure header directory names.
# |   
# |   Removed checks
# |   ^^^^^^^^^^^^^^
# `-----------------------------
# 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/176940


More information about the cfe-commits mailing list