[clang-tools-extra] [llvm] [clang-tidy] New check `misc-header-guard` (PR #177315)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 08:21:02 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE LINT COMMENT: clang-tidy-->
:warning: C/C++ code linter, clang-tidy found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
```bash
git diff -U0 origin/main...HEAD -- clang-tools-extra/clang-tidy/misc/HeaderGuardCheck.cpp clang-tools-extra/clang-tidy/misc/HeaderGuardCheck.h clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp |
python3 clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -path build -p1 -quiet
```
</details>
<details>
<summary>
View the output from clang-tidy here.
</summary>
```
clang-tools-extra/clang-tidy/misc/HeaderGuardCheck.cpp:72:7: warning: class 'HeaderGuardCallbacks' can be moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
72 | class HeaderGuardCallbacks : public PPCallbacks {
| ^
```
</details>
https://github.com/llvm/llvm-project/pull/177315
More information about the llvm-commits
mailing list