================ @@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer( : Context(Ctx), ExternalDiagEngine(ExternalDiagEngine), RemoveIncompatibleErrors(RemoveIncompatibleErrors), GetFixesFromNotes(GetFixesFromNotes), - EnableNolintBlocks(EnableNolintBlocks) {} + EnableNolintBlocks(EnableNolintBlocks) { + + if (Context.getOptions().ExcludeHeaderFilterRegex) + ExcludeHeaderFilter = std::make_unique<llvm::Regex>( + *Context.getOptions().ExcludeHeaderFilterRegex); ---------------- justincady wrote:
What makes you suspect it doesn't work? I did some testing by placing `abort()` in an else clause and it caused many unit tests to crash. That leads me to believe it remains `std::nullopt` when the option is not specified. I will do some more thorough testing to confirm. https://github.com/llvm/llvm-project/pull/91400 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits