codechecker icon indicating copy to clipboard operation
codechecker copied to clipboard

CodeChecker trashing all C++ files

Open efagerho opened this issue 7 months ago • 5 comments

Describe the bug

I have an Xcode project and I've created the compile_commands.json as follows:

xcodebuild -project path/to/.xcodeproj | \
    xcpretty -r json-compilation-database --output path/for/compile_commands.json

Following the manual, I've then execute CodeChecker as follows:

CodeChecker analyze ./compile_commands.json --enable sensitive --output ./reports

The code checker will then print lots of output as follows:

[ERROR 2024-07-18 15:51] - Analyzing SetText.cpp with clangsa  failed!
[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

If I after running the analyzer run git status I see that it has trashed every C++ file in my project. I can manually run the compilation commands in the JSON and they work just fine. Paths that it generates to the files are also correct.

CodeChecker version

6.23.1

Expected behaviour

It should actually do the analysis.

Desktop (please complete the following information)

  • OS: MacOS Sonoma 14.5

efagerho avatar Jul 18 '24 13:07 efagerho