================ @@ -562,9 +567,10 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location, } StringRef FileName(File->getName()); - LastErrorRelatesToUserCode = LastErrorRelatesToUserCode || - Sources.isInMainFile(Location) || - getHeaderFilter()->match(FileName); + LastErrorRelatesToUserCode = + LastErrorRelatesToUserCode || Sources.isInMainFile(Location) || + (getHeaderFilter()->match(FileName) && + (ExcludeHeaderFilter ? !ExcludeHeaderFilter->match(FileName) : true)); ---------------- justincady wrote:
Thank you! Simplified that snippet and added the tests as suggested. 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