<div dir="ltr">Thanks Artem. I will try that. <div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 29, 2020 at 1:13 PM Artem Dergachev <<a href="mailto:noqnoqneo@gmail.com">noqnoqneo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I never tried this but what you're doing is clearly not sufficient. <br>
SetUpStaticAnalyzer only asks the preprocessor to act as if the static <br>
analyzer is eventually going to be run.<br>
<br>
You should start with making sure your action is AnalysisAction. You can <br>
probably use clang-check as an example.<br>
<br>
On 5/28/20 8:53 PM, Billy Araujo via cfe-dev wrote:<br>
> Hi All,<br>
><br>
> In my clang tool I setup the static analyzer using the following code:<br>
> But I am not sure if this is sufficient. I don't see any analyzer <br>
> messages in the output. Is there any way to test if it is active?<br>
><br>
><br>
> bool runInvocation(std::shared_ptr<clang::CompilerInvocation> <br>
> invocation, clang::FileManager* files, <br>
> std::shared_ptr<clang::PCHContainerOperations> PCHContainerOps, <br>
> clang::DiagnosticConsumer* diagConsumer) override<br>
> {<br>
> invocation->getPreprocessorOpts().SetUpStaticAnalyzer = true;<br>
> return <br>
> clang::tooling::FrontendActionFactory::runInvocation(invocation, <br>
> files, PCHContainerOps, diagConsumer);<br>
> }<br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote></div>