使用Clang Analyzer生成报告 - scan-build
问题描述:
我是Clang分析器的新手,我试图使用scan-build生成报告。当使用扫描构建如下:使用Clang Analyzer生成报告 - scan-build
./scan-build --use-analyzer=/build/Debug+Asserts/bin/clang -v -o report_location sample.xcodeproj
我总是得到如下错误:
scan-build: Using `/build/Debug+Asserts/bin/clang' for static analysis ; Can't exec "sample.xcodeproj":
Permission denied at ./scan-build line 1029. ;
scan-build: Removing directory 'report_location/2013-06-25-1' because it contains no reports. ;
scan-build: No bugs found.
请帮我解决这个问题。
答
扫描生成的工作方式是,要么
- 调用您提供如命令
make
- 执行您提供的文件,例如一些外壳脚本
当它这样做,它覆盖了$ CC环境变量指向另一个脚本从它分叉两个进程。在一个编译器运行的定期构建和另一个静态分析器运行生成报告。
您正在收到此错误,因为'sample.xcodeproj'不是可执行文件。 我不是很熟悉xcode
但我想如果你chmod +x sample.xcodeproj
那么事情应该工作。
铛静电分析器可以与xcode中被集成,以及: