私は静的コード解析に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をコンパイルする必要があります。