clang: error: argument unused during compilation: '--analyze'

Hi All,

We are trying to run clang on our code base with the static analuzer enabled by option “–analyze” .But we couldn’t succed to run the same :frowning: and here is the command line options we tried while runing the clang

clang -MM -MP -MT HAS_manager_controller.o --analyze -Wall -Werror -g -DHASMGR_DEBUG_HEAP -DHASMGR_ENABLE_METRICS_OUTPUT -I/root/projects/samples/internals/hasmanger_27_feb_2012/HASMGR/ …/HAS_manager_controller.c
clang: error: argument unused during compilation: ‘–analyze’

For you reference
root@localhost simple_player]# clang --version
clang version 3.2 (trunk)
Target: i386-pc-linux-gnu
Thread model: posix

Any inputs will be really appreciate

Thanks
~Umesh

Umesh,

We encourage users of the analyzer to rely on scan-build or XCode to run the analyzer on their code base. The 'clang --analyze' command should be viewed as an implementation detail as this interface will change after we add inter-module analyzes.

Looks like you are getting the error because the analyzer is not compatible with "-MM -MP -MT HAS_manager_controller.o" options.

Anna.