<div dir="ltr"><div>Hi All,</div><div><br></div>In my clang tool I setup the static analyzer using the following code:<br><div>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?</div><div><br></div><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div>    <span style="color:rgb(86,156,214)">bool</span> <span style="color:rgb(220,220,170)">runInvocation</span>(<span style="color:rgb(78,201,176)">std</span>::<span style="color:rgb(78,201,176)">shared_ptr</span><<span style="color:rgb(78,201,176)">clang</span>::<span style="color:rgb(78,201,176)">CompilerInvocation</span>> <span style="color:rgb(156,220,254)">invocation</span>, <span style="color:rgb(78,201,176)">clang</span>::<span style="color:rgb(78,201,176)">FileManager</span><span style="color:rgb(86,156,214)">*</span> <span style="color:rgb(156,220,254)">files</span>, <span style="color:rgb(78,201,176)">std</span>::<span style="color:rgb(78,201,176)">shared_ptr</span><<span style="color:rgb(78,201,176)">clang</span>::<span style="color:rgb(78,201,176)">PCHContainerOperations</span>> <span style="color:rgb(156,220,254)">PCHContainerOps</span>, <span style="color:rgb(78,201,176)">clang</span>::<span style="color:rgb(78,201,176)">DiagnosticConsumer</span><span style="color:rgb(86,156,214)">*</span> <span style="color:rgb(156,220,254)">diagConsumer</span>) <span style="color:rgb(86,156,214)">override</span></div><div>    {        </div><div>        <span style="color:rgb(156,220,254)">invocation</span>-><span style="color:rgb(220,220,170)">getPreprocessorOpts</span>().<span style="color:rgb(156,220,254)">SetUpStaticAnalyzer</span> = <span style="color:rgb(86,156,214)">true</span>;</div><div>        <span style="color:rgb(197,134,192)">return</span> <span style="color:rgb(78,201,176)">clang</span>::<span style="color:rgb(78,201,176)">tooling</span>::<span style="color:rgb(78,201,176)">FrontendActionFactory</span>::<span style="color:rgb(220,220,170)">runInvocation</span>(invocation, files, PCHContainerOps, diagConsumer);</div><div>    }</div><br></div></div></div>