[cfe-dev] clang AST printer

Manuel Klimek klimek at google.com
Fri Sep 21 09:49:13 PDT 2012

On Fri, Sep 21, 2012 at 6:45 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> 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!

Yep, exactly. I think we're all in happy and violent agreement. Thanks
Jordan for helping to clear that up :)


More information about the cfe-dev mailing list