[cfe-dev] Clang static analyzer

Billy Araujo via cfe-dev cfe-dev at lists.llvm.org
Thu May 28 10:53:40 PDT 2020

Hi All,

In my clang tool I setup the static analyzer using the following code:
But I am not sure if this is sufficient. I don't see any analyzer messages
in the output. Is there any way to test if it is active?

bool runInvocation(std::shared_ptr<clang::CompilerInvocation> invocation,
clang::FileManager* files, std::shared_ptr<clang::PCHContainerOperations>
PCHContainerOps, clang::DiagnosticConsumer* diagConsumer) override
invocation->getPreprocessorOpts().SetUpStaticAnalyzer = true;
return clang::tooling::FrontendActionFactory::runInvocation(invocation,
files, PCHContainerOps, diagConsumer);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200528/5effe5cb/attachment.html>

More information about the cfe-dev mailing list