Open socketpair opened 7 months ago
This is EXTREMELY important, since scan-builds does not work correctly on cmake-generated makefiles in my environment (cross-compiling with mingw)
@socketpair: You could generate compile database with CMake and then use run-clang-tidy
to run Static Analyzer checks from Clang-tidy.
@EugeneZelenko
-checks=-*,clang-analyzer-*
should be enable all released Static Analyzer checks. See also https://clang.llvm.org/extra/clang-tidy/index.html.run-clang-tidy.py -quiet -header-filter "*" -p <directory where compile database is located> -checks=<checks> -j <number process to spawn>
You also need to run CMake with CMAKE_EXPORT_COMPILE_COMMANDS=ON
.
@EugeneZelenko Seems, I understand what you meant, but anyway, compiler's cmdline INCLUDES @xxx.rsp
, so even your way will fail, since clang's analyzer will not be able to include some header files.
So, this bug is still actual.
As a workaround I can flatten these files to long cmdline, but this is a crutch.
The following script demonstrates the problem:
Fedora 39, x86-64.