[gmx-developers] Clang static analyzer (scan-build and scan-view)
Vedran Miletić
vedran at miletic.net
Thu Dec 8 20:20:53 CET 2016
Hi,
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
$ cmake -DCMAKE_BUILD_TYPE=Debug -DGMX_DEVELOPER_BUILD=ON -DGMX_GPU=OFF
-DGMX_OPENMP=OFF -DGMX_SIMD=None -DGMX_FFT_LIBRARY=fftpack
-DCMAKE_C_COMPILER=/usr/local/bin/clang
-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?
Regards,
Vedran
--
Vedran Miletić
vedran.miletic.net
More information about the gromacs.org_gmx-developers
mailing list