LLVM Discussion Forums

Scan-build on Windows

I’ve tried to check https://github.com/glennrp/libpng.git with scan-build like below:

  1. cmake -G"Unix Makefiles" …
  2. scan-build -o . --use-analyzer=D:\llvm-project\buildvs\Debug\bin\clang.exe -internal-stats make

It compiled successfully and scan-build reported:
scan-build:Analysis run complete.
scan-build: Removing directory ‘D:/WORKSPACE/+libpng-libpng16/build/2020-06-01-171604-9004-1’ because it contains no reports.
scan-build: No bugs found.

Then I intentionally added an ill-formed function with division by zero. Cleaned the build and run scan-build analysis again. It compiled successfully again but scan-build reported the same, that it didn’t find any errors.

For sample file scan-build works well (scan-build -o . --use-analyzer=D:\llvm-project\buildvs\Debug\bin\clang.exe gcc -c test.cpp)

Does anybody get a real report with detected errors running scan-build through a whole real project on Windows (not a sample cpp file)?