[clang-tools-extra] [llvm] New check `misc-header-guard` (PR #177315)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 26 08:10:20 PST 2026
vbvictor wrote:
> * Replace `#pragma once` with guard.
Then https://clang.llvm.org/extra/clang-tidy/checks/portability/avoid-pragma-once.html check can probably be replaced with alias to `misc-header-guard` that will always use logic "replace pragma once with guard".
You can probably use bits of `avoid-pragma-once` check in this check by refactoring into util.
https://github.com/llvm/llvm-project/pull/177315
More information about the cfe-commits
mailing list