[clang-tools-extra] [clang-tidy] Emit warnings from user headers by default (PR #164165)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 27 15:43:28 PDT 2025


================
@@ -133,13 +133,15 @@ file, if any.
 static cl::opt<std::string> HeaderFilter("header-filter", desc(R"(
 Regular expression matching the names of the
 headers to output diagnostics from. Diagnostics
-from the main file of each translation unit are
-always displayed.
+from the main file and all non-system headers 
+of each translation unit are always displayed.
+Set this option to an empty string to disable 
+diagnostics from non-system headers.
----------------
vbvictor wrote:

The whole text would be like this:
```
Regular expression matching the names of the
headers to output diagnostics from. The default
value is '.*', i.e. diagnostics from all non-system
headers are displayed by default. Diagnostics
from the main file of each translation unit are
always displayed.
Can be used together with -line-filter.
This option overrides the 'HeaderFilterRegex'
option in .clang-tidy file, if any.
```

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


More information about the cfe-commits mailing list