[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

Justin Cady via cfe-commits cfe-commits at lists.llvm.org
Wed May 8 13:17:03 PDT 2024


================
@@ -578,6 +579,13 @@ llvm::Regex *ClangTidyDiagnosticConsumer::getHeaderFilter() {
   return HeaderFilter.get();
 }
 
+llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() {
+  if (!ExcludeHeaderFilter)
+    ExcludeHeaderFilter = std::make_unique<llvm::Regex>(
+        *Context.getOptions().ExcludeHeaderFilterRegex);
----------------
justincady wrote:

I just pushed a commit that omits the check when `ExcludeHeaderFilter` is not set by the user. Please let me know if this aligns with your idea.

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


More information about the cfe-commits mailing list