[cfe-dev] Why Printer Classes are private?

Alex L via cfe-dev cfe-dev at lists.llvm.org
Wed Oct 18 16:30:25 PDT 2017

Hi Roman,

On 18 October 2017 at 14:35, Roman Popov via cfe-dev <cfe-dev at lists.llvm.org
> wrote:

> In StmtPrinter there is a PrintHelper that can be used to override
> printing of some nodes. I guess PrintHelper was introduced for someone
> like me that wanted to override some StmtPrinter visitors.
> But DeclPrinter does not supports PrintHelper for some reason.

It's possible that nobody else needed a customized DeclPrinter before, so
it wasn't necessary to add a helper for it.
I think that it would make sense to add a helper class for DeclPrinter if
there's a good enough justification for it. Would you be interested in
working on a patch for such a helper class?


> 2017-10-18 12:53 GMT-07:00 Roman Popov <ripopov at gmail.com>:
>> Hello,
>> I want to redefine some visitors in DeclPrinter and StmtPrinter, but they
>> are not exported over Clang API. Why is that?
>> Currently I have to copy-paste them into my tool. But this unfortunately
>> leads to some duplication.
>> -Roman
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171018/d9f08aef/attachment.html>

More information about the cfe-dev mailing list