[clang-tools-extra] [llvm] [clang-tidy] New check `misc-header-guard` (PR #177315)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 6 02:30:11 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 3111 tests passed
* 7 tests skipped
* 1 test failed

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

### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/misc/header-guard.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 12
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.1.yaml --header-filter=.* -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.1.msg 2>&1
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.1.yaml '--header-filter=.*' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc
# note: command had no output on stdout or stderr
# RUN: at line 13
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.1.msg -check-prefix=CHECK-MESSAGES1 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.1.msg -check-prefix=CHECK-MESSAGES1 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 14
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.1.yaml -check-prefix=CHECK-YAML1 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.1.yaml -check-prefix=CHECK-YAML1 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 43
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.2.yaml --header-filter=.*    --config='{CheckOptions: {      misc-header-guard.HeaderDirs: other,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.2.msg 2>&1
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.2.yaml '--header-filter=.*' '--config={CheckOptions: {      misc-header-guard.HeaderDirs: other,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc
# note: command had no output on stdout or stderr
# RUN: at line 47
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.2.msg -check-prefix=CHECK-MESSAGES2 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.2.msg -check-prefix=CHECK-MESSAGES2 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 48
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.2.yaml -check-prefix=CHECK-YAML2 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.2.yaml -check-prefix=CHECK-YAML2 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 87
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.3.yaml --header-filter=.*    --config='{CheckOptions: {      misc-header-guard.HeaderDirs: other;include,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.3.msg 2>&1
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.3.yaml '--header-filter=.*' '--config={CheckOptions: {      misc-header-guard.HeaderDirs: other;include,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc
# note: command had no output on stdout or stderr
# RUN: at line 91
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.3.msg -check-prefix=CHECK-MESSAGES3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.3.msg -check-prefix=CHECK-MESSAGES3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 92
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.3.yaml -check-prefix=CHECK-YAML3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.3.yaml -check-prefix=CHECK-YAML3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 127
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.4.yaml --header-filter=.*    --config='{CheckOptions: {      misc-header-guard.Prefix: SOME_PREFIX_,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.4.msg 2>&1
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.4.yaml '--header-filter=.*' '--config={CheckOptions: {      misc-header-guard.Prefix: SOME_PREFIX_,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc
# note: command had no output on stdout or stderr
# RUN: at line 131
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.4.msg -check-prefix=CHECK-MESSAGES4 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.4.msg -check-prefix=CHECK-MESSAGES4 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 132
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.4.yaml -check-prefix=CHECK-YAML4 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.4.yaml -check-prefix=CHECK-YAML4 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# note: command had no output on stdout or stderr
# RUN: at line 172
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.yaml --header-filter=.*    --config='{CheckOptions: {      misc-header-guard.EndifComment: true,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc > /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.msg 2>&1
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp misc-header-guard /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp -export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.yaml '--header-filter=.*' '--config={CheckOptions: {      misc-header-guard.EndifComment: true,    }}' -- -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc
# note: command had no output on stdout or stderr
# RUN: at line 176
FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.msg -check-prefix=CHECK-MESSAGES5 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# executed command: FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.msg -check-prefix=CHECK-MESSAGES5 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp:179:21: error: CHECK-MESSAGES5: expected string not found in input
# | // CHECK-MESSAGES5: correct.hpp:6:2: warning: #endif for a header guard should reference the guard macro in a comment [misc-header-guard]
# |                     ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.msg:1:1: note: scanning from here
# | Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.cpp', '--export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.yaml', '--checks=-*,misc-header-guard', '--header-filter=.*', '--config={CheckOptions: { misc-header-guard.EndifComment: true, }}', '--', '-I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc', '-std=c++11', '-nostdinc++']...
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.msg:4:127: note: possible intended match here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard/include/correct.hpp:8:2: warning: #endif for a header guard should reference the guard macro in a comment [misc-header-guard]
# |                                                                                                                               ^
# | 
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.msg
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              1: Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.cpp', '--export-fixes=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/misc/Output/header-guard.cpp.tmp.5.yaml', '--checks=-*,misc-header-guard', '--header-filter=.*', '--config={CheckOptions: { misc-header-guard.EndifComment: true, }}', '--', '-I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc', '-std=c++11', '-nostdinc++']... 
# | check:179'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |              2: ------------------------ clang-tidy output ----------------------- 
# | check:179'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              3: 6 warnings generated. 
# | check:179'0     ~~~~~~~~~~~~~~~~~~~~~~
# |              4: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard/include/correct.hpp:8:2: warning: #endif for a header guard should reference the guard macro in a comment [misc-header-guard] 
# | check:179'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:179'1                                                                                                                                   ?                                                                                                                      possible intended match
# |              5:  8 | #endif 
# | check:179'0     ~~~~~~~~~~~~
# |              6:  | ^~~~~ 
# | check:179'0     ~~~~~~~~~
# |              7:  | endif // CORRECT_HPP 
# | check:179'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |              8: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/misc/header-guard/include/missing.hpp:1:1: warning: header is missing header guard [misc-header-guard] 
# | check:179'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              9:  1 | // RUN: %check_clang_tidy %s misc-header-guard missing -export-fixes=%t.yaml > %t.msg 2>&1 
# | check:179'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/177315


More information about the cfe-commits mailing list