[cfe-dev] clang AST printer

Dmitri Gribenko gribozavr at gmail.com
Fri Sep 21 09:45:29 PDT 2012

On Fri, Sep 21, 2012 at 7:43 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>>>>> 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.

I completely agree.  Thanks for clarifying!


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/

More information about the cfe-dev mailing list