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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 22 08:10:41 PST 2026


================
@@ -103,6 +103,14 @@ New checks
   Finds and removes redundant conversions from ``std::[w|u8|u16|u32]string_view`` to
   ``std::[...]string`` in call expressions expecting ``std::[...]string_view``.
 
+- New :doc:`misc-header-guard <clang-tidy/checks/misc/header-guard>` check.
+
+  Finds and fixes header guards.
+  The option ``misc-header-guard.HeaderDirs`` allows configuring one or more
+  header directory names. Default value is ``include``.
+  The option ``misc-header-guard.Prefix`` allows specifying an optional prefix
+  that is applied to each header guard. By default, no prefix is used.
----------------
EugeneZelenko wrote:

One sentence is enough. Everything else belongs to documentation.

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


More information about the cfe-commits mailing list