Carlos =?utf-8?q?Gálvez?= <[email protected]>,
Carlos =?utf-8?q?Gálvez?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -449,6 +479,10 @@ ClangTidyASTConsumerFactory::createASTConsumer(
}
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
+
+ if (!Context.getOptions().SystemHeaders.value_or(false))
+ Consumers.push_back(std::make_unique<IgnoreSystemHeadersConsumer>());
+
if (!Checks.empty())
Consumers.push_back(Finder->newASTConsumer());
----------------
carlosgalvezp wrote:
Hmm, this code does not compile? `IgnoreSystemHeadersConsumer` does not have a
constructor accepting a `unique_ptr<ASTConsumer>`?
There's also duplication in creating the `Finder->newASTConsumer()`, so I don't
see how this solution would be preferable. I can certainly move the
`IgnoreSystemHeadersConsumer` inside the `if(!Checks.empty())` though.
https://github.com/llvm/llvm-project/pull/128150
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits