Clang static analyzer checkers

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?

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 пишет:

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 (). 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).

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

15/03/2017 6:26 AM, Xin Wang wrote: