[analyzer] clang analyzer flag vs scan build

Hi,

I was trying to integrate the static analysis tools into a few of my projects.

I started using scan-build, and couldn’t get it working on larger projects, even after exporting CXX & CC variables.

It just always reported ‘no bugs found’.

Using clang++ --analyze, I was able to see warning messages.

On the smaller projects, I noticed that the errors were the same for both the compiler argument(–analyze) and the scan-build command.

Would anyone know if and how they would incur different warning reports?

Thanks!

-Cyndy Ishida

I would recommend looking at the build script to see if there are any errors and if the source files where you expect errors to occur are being analyzed. (If it’s a makefile project, do not forget to run scan-build configure.)

Cheers,
Anna