[cfe-dev] clang AST printer

Jordan Rose jordan_rose at apple.com
Fri Sep 21 09:43:23 PDT 2012

>>>> If we want a pretty-printer, I'd expect -pretty-print and not
>>>> -ast-dump to trigger that?
>>> I'd just leave it as an API.
>> I'm not sure what you mean by that. I agree that there are use cases
>> for a pretty printer, but I think "half" of the ast-dump mechanism is
>> a bad place to have a pretty printer...
> Imagine a Clang-based Doxygen-like tool.  Not only we need to extract
> documentation comments and format them, we also need to pretty-print
> declarations to display them along with documentation.  So only decl
> printer is useful.

I think the point is not that printy-printing should be removed (I agree with Dmitri that it shouldn't) but that -ast-dump should not pretty-print Decls (I agree with Manuel that it shouldn't). These do not seem like incompatible goals.

More information about the cfe-dev mailing list