[cfe-dev] Clang static analyzer checkers

Artem Dergachev via cfe-dev cfe-dev at lists.llvm.org
Wed Mar 15 03:08:21 PDT 2017


You can add `-DLLVM_ENABLE_ASSERTIONS=1` to the cmake command and it'll 
work.

15/03/2017 6:26 AM, Xin Wang wrote:
> Did you mean that it is impossible to get the CFGgraph and the 
> Explodedgraph in the ubuntu?
> I also built clang(version5.0.0 (trunk 297742)) from sources in 
> Ubuntu16.04, all the debug checkers worked well except the 
> debug.ViewCFG and the debug.ViewExplodedGraph. The debug checker 
> debug.ViewCallGraph could output the call graph and the graph could be 
> opened by the xdot.
> Thank you very much!
>
> 2017-03-14 19:16 GMT-07:00 Artem Dergachev <noqnoqneo at gmail.com 
> <mailto:noqnoqneo at gmail.com>>:
>
>     This functionality is under `#ifndef NDEBUG`, removed from builds
>     without asserts. I don't instantly understand the good reason for
>     that though. Even if there is one, we should mention it on the
>     website
>     (http://clang-analyzer.llvm.org/checker_dev_manual.html#visualizing
>     <http://clang-analyzer.llvm.org/checker_dev_manual.html#visualizing>).
>
>     There are no dependencies involved; all clang has to do is to
>     write a plain-text .dot file by hand and system() a universal
>     viewer command (eg. xdg-open on linux).
>
>
>
>     14/03/2017 9:10 PM, Aleksei Sidorin via cfe-dev wrote:
>>     I can only guess (didn't try it) but there may be problems with
>>     dependencies. Could you try to build clang from sources and test
>>     it? You can also try to use strace to see what kind of dot viewer
>>     is called in the pre-built binary.
>>
>>
>>     14.03.2017 18:36, Xin Wang via cfe-dev пишет:
>>>
>>>     Hello!
>>>
>>>     For the pre-built binaries(LLVM4.0.0) of clang for x86_64
>>>     Ubuntu16.04, the analyzer checkers debug.ViewCFG and
>>>     debug.ViewExplodedGraph can't output the graph. But for the
>>>     pre-built binaries(LLVM4.0.0) of clang for Windows(64-bit), they
>>>     work well.  What's the reason?
>>>
>>>
>>>
>>>     _______________________________________________
>>>     cfe-dev mailing list
>>>     cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>>>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>>     <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
>>
>>     -- 
>>     Best regards,
>>     Aleksei Sidorin,
>>     SRR, Samsung Electronics
>>
>>     _______________________________________________
>>     cfe-dev mailing list
>>     cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>     <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
>



More information about the cfe-dev mailing list