Closed rizsotto closed 10 years ago
comment from Nikola Smiljanić:
Try playing with -ccc-print-phases. I'm not sure if there's a way to start both analyzer and compiler action. Compiler action is what reports the warning, you can enable just this action with -fsyntax-only. But passing both --analyze and -fsyntax-only doesn't seem to work.
no solution here... all i can see that the compiler
phase make the warning.
this suppose to generate the warning.
$ clang -ccc-print-phases -x c not_used_attributes.c
0: input, "not_used_attributes.c", c
1: preprocessor, {0}, cpp-output
2: compiler, {1}, assembler
3: assembler, {2}, object
4: linker, {3}, image
while the analyzer is silent.
$ clang --analyze -ccc-print-phases -x c not_used_attributes.c
0: input, "not_used_attributes.c", c
1: preprocessor, {0}, cpp-output
2: analyzer, {1}, plist
and syntax check also generate the expected warning.
$ clang -fsyntax-only -ccc-print-phases -x c not_used_attributes.c
0: input, "not_used_attributes.c", c
1: preprocessor, {0}, cpp-output
2: compiler, {1}, none
hi All,
would like to know is it possible to get the same warning while run the analyzer as it was produce by simple compilation?
when i give this input
test.c
and run Clang against it, i get this warning...
but when i run the analyzer, i got nothing like that
then i execute the last line of this output
and it does not generate the warning. my question would be: is it possible to get that warning by passing some extra flags? or it will never appear during the analysis? thanks for any help.