-emit-ast doesn't work with static analyzer

Hi all,

Recently I need to generate AST files while using clang static analyzer. I found that the option “-emit-ast” could not work with static analyzer. I used the command like this: clang -emit-ast --analyze -Xanalyzer -analyzer-checker=core.DivideZero a.c. Then I got a warning: argument unused during compilation: ‘-emit-ast’. I can only compile the source code once for some reason, so I have to generate ast file and use static analyzer at the same time. How can I manage that?

Thanks in advance


Hi Jack,