[gmx-developers] Clang static analyzer (scan-build and scan-view)

Vedran Miletić vedran at miletic.net
Thu Dec 8 20:20:53 CET 2016


I am trying to reproduce Jenkins' Clang static analyzer locally. I have
Clang / LLVM latest git installed in /usr/local (for some reason 3.8
that comes with Fedora 24 is unable to compile a simple test, did not
look into it further).

Per admin/builds/clang-analyzer.py I do

-DCMAKE_CXX_COMPILER=/usr/local/bin/clang++ ..

and then

$ scan-build make -j8

but never get any warnings. I tried infesting the code with known
positives and even calling it from other functions to make sure it
doesn't get optimized out, but did not help. I tried setting
--use-cc=/usr/local/bin/clang --use-c++=/usr/local/bin/clang++ but did
not help. Also, running

$ scan-build clang++ helloworld.cpp

works as expected. Any ideas what I am doing wrong and what I can try?


Vedran Miletić

More information about the gromacs.org_gmx-developers mailing list