[cfe-dev] How to view .ast file?

Ted Kremenek kremenek at apple.com
Thu May 19 14:44:51 PDT 2011


On May 19, 2011, at 2:05 PM, hunter wrote:

> Thanks. Do you refer to -ast-print?

-ast-print and -ast-dump indeed provide different views of the AST.

> Also, is it implemented by Clang to generate a CFG from a given .ast file?

Like an AST, the CFG is an internal data structure.  Within the compiler, CFGs are generated on-demand from ASTs when they are needed.

Are you asking if it is possible to dump a textual representation of the CFG of a given function from an AST file?  If so, there is currently no driver logic for that, but it is definitely possible.



More information about the cfe-dev mailing list