1

私は Clang アナライザーを初めて使用し、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.

この問題の解決を手伝ってください。

4

1 に答える 1

0

スキャンビルドの仕組みは次のいずれかです

  1. あなたが提供するコマンドを呼び出します。make
  2. シェルスクリプトなど、提供したファイルを実行します

その際、$CC 環境変数をオーバーライドして、2 つのプロセスをフォークする別のスクリプトを指定します。1 つのコンパイラは通常のビルドとして実行され、別の静的アナライザーはレポートを生成するために実行されます。

「sample.xcodeproj」は実行可能ファイルではないため、このエラーが発生しています。私はあまり詳しくありませんxcodeが、あなたならうまくいくchmod +x sample.xcodeprojはずです。

clang-static アナライザーは、xcode と統合することもできます。

http://clang-analyzer.llvm.org/xcode.html

https://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode_User_Guide/000-About_Xcode/about.html#//apple_ref/doc/uid/TP40010215-CH3-SW17

于 2013-06-28T12:35:18.973 に答える