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

via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 26 08:23:43 PST 2026


EugeneZelenko wrote:

> I have added option `AllowPragmaOnce` so that the check does not warn if `#pragma once` is used. I hope it is
> 
> > Replace #pragma once with guard.
> 
> Would it be acceptable to handle this in a follow-up PR? I’m unsure how to get the `Loc` correctly, since most of the work is done in the base class `utils::HeaderGuardCheck`.

Sure, this may be implemented separately.

https://github.com/llvm/llvm-project/pull/177315


More information about the cfe-commits mailing list