================
@@ -0,0 +1,92 @@
+.. title:: clang-tidy - llvm-header-guard
+
+misc-header-guard
+=================
+
+Finds and fixes header guards that do not conform to the configured style
+options from this check.
+
+All following examples consider header file
+``/path/to/include/component/header.hpp``
+
+By default, the check ensures following header guard:
+
+.. code-block:: c++
+
+ #ifndef COMPONENT_HEADER_HPP
+ #define COMPONENT_HEADER_HPP
+ ...
+ # endif
+
+Options
+-------
+
+.. option:: HeaderDirs
+
+ A semicolon-separated list of one or more header directory names. Header
+ directories may contain `/` as path separator. The list is searched for the
+ first matching string. The header guard will start from this path
+ component. Default value is `include`.
+
+ E.g. :option:`HeaderDirs` is set to one of the following values:
+
+ - `component`
+ - `include/component`
+ - `component;include`
+
+ It results in the same following header guard:
+
+ .. code-block:: c++
+
+ #ifndef HEADER_HPP
+ #define HEADER_HPP
+ ...
+ # endif
+
+ .. warning::
+
+ The .:option:`HeaderDirs` list is searched until first directory name
+ matches the header file path. E.g. if `HeaderDirs` is set to
----------------
EugeneZelenko wrote:
```suggestion
matches the header file path. E.g. if :option:`HeaderDirs` is set to
```
Please also fix formatting after change.
https://github.com/llvm/llvm-project/pull/177315
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits