[cfe-dev] Mapping Clang C code AST to Code

Douglas Gregor dgregor at apple.com
Fri Jun 15 10:20:29 PDT 2012


On Jun 13, 2012, at 9:28 AM, Carlos Andrade wrote:

> Hi,
> 
> I have been trying without much success figuring a way to map the -ast-view from Clang cc1 option to code, and --ast-dump-XML as well. Is this possible? If so, how?
> 
> Please let me know if this is the wrong list to post this.. 


Neither of these is directly possible. The AST-printing facilities do not print well-formed code, and the XML dumps are both incomplete and not necessarily well structured for anything other than debugging the compiler. That's why both options are hidden behind the compiler's internal -cc1 interface.

What are you actually trying to accomplish?

	- Doug



More information about the cfe-dev mailing list