================
@@ -34,6 +35,50 @@ Options
    insertion/removal for all headers under the directory `foo`. Default is an
    empty string, no headers will be ignored.
 
+.. option:: FragmentHeaders
+
+   A semicolon-separated list of regular expressions that match against
+   normalized resolved include paths (POSIX-style separators). Direct includes
+   of the main file that match are treated as fragments of the main file for
+   usage scanning. This is intended for non-self-contained generated
+   ``.inc``/``.def`` files or other include fragments. Only direct includes are
+   considered; includes inside fragments are not treated as fragments. Default
+   is ``""``.
+
+   Diagnostics remain anchored to the main file, but symbol uses inside
+   fragments can keep prerequisite includes in the main file from being
+   removed or marked missing. Note that include-cleaner does not support
+   ``// IWYU pragma: associated``.
+
+   Example configuration:
+
+   .. code-block:: yaml
+
+      CheckOptions:
+        - key: misc-include-cleaner.FragmentHeaders
+          value: 'gen-out/;generated/;\\.(inc|def)$'
+
+.. option:: FragmentDependencyCommentFormat
+
+   A trailing comment format to add to includes that are kept only because they
+   are used from fragment headers matched by :option:`FragmentHeaders`. The
+   value should not include the leading ``//``. An empty string disables these
+   diagnostics and fix-its. Default is ``""``.
----------------
EugeneZelenko wrote:

```suggestion
   value should not include the leading `//`. An empty string disables these
   diagnostics and fix-its. Default is `""`.
```

https://github.com/llvm/llvm-project/pull/196767
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to