[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 06:40:42 PDT 2024
================
@@ -564,7 +564,8 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location,
StringRef FileName(File->getName());
LastErrorRelatesToUserCode = LastErrorRelatesToUserCode ||
Sources.isInMainFile(Location) ||
- getHeaderFilter()->match(FileName);
+ (getHeaderFilter()->match(FileName) &&
+ !getExcludeHeaderFilter()->match(FileName));
----------------
PiotrZSL wrote:
would be nice to omit checking ExcludeHeaderFilter if it's not set.
https://github.com/llvm/llvm-project/pull/91400
More information about the cfe-commits
mailing list