2017-07-17 8 views
0

私は静的コード解析にclang-checkを使用しようとしています。 私のmakefileはcompile_commands.jsonを生成しています。これまでのところ、clang-checkはx86プラットフォームでうまく動作しますが、アームプラットフォームにも使用したいと考えています。 エントリの一つは次のようになります。ARM用アームをターゲットとしたclang-check

{ 
    "directory": "/path/to/myproject/src", 
    "command": "arm-none-eabi-gcc -DBOARD_VERSION=3 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -std=gnu11 -Wall -Werror -Os -DVERSION_MAJOR=2 -DVERSION_MINOR=4 -DVERSION_PATCH=2 -I/path/to/myproject/src -I/usr/arm-none-eabi/include -MMD -MP -MF/path/to/myproject/.build/debug/src/main.d -MT//path/to/myproject/.build/debug/src/main.o -c -o /path/to/myproject/.build/debug/src/main.o /path/to/myproject/src/main.c", 
    "file": "/path/to/myproject/src/main.c" 
}, 

それは私にいくつかの一般的なエラーを与えながら、それはまた、(中断の構文のように)私のx86への相対誤差を与える:

error: x86-64 'interrupt' attribute only applies to functions that have only a pointer parameter optionally followed by an integer parameter

clang-私はfedoraディストリビューションの一部ですが、バイナリをチェックしてください。でも、アームのためにうまく動作するようにする方法があるのでしょうか?

多分いくつかのオプション(私は何も見つかりませんでした)、または多分私は特定のclang-checkをコンパイルする必要があります。

答えて

1

ネヴァーマインド、私が使用していることが見つかりました:

scan-build --use-cc=$(CC) --analyzer-target=arm -o .build make clean all 

が打ち鳴らすアナライザを使用して、あまりにも

良い代替ました
関連する問題