Michael137 wrote:

> I like the direction.
> 
> Some comments:
> 
> * This would be better declared in Decl.h, since it's about printing 
> declarations, and not related to types.
> * This could probably get rid of the additional bool flags, and rely on 
> PrintingPolicy entirely.
> * Instead of the `printAnonymousTagDecl` helper, we could probably implement 
> a `print` method for TagDecls, which takes care of the named case, and for 
> the unnamed case, takes care of the EnumDecl and RecordDecl specific 
> behavior, including the typedef to unnamed class.

Latest commit reworks the patch to do the anonymous type-printing in 
`TagDecl::printName`. Getting the tag keyword to print is a bit fiddly. Not a 
big fan of having to introduce another bit into the `PrintingPolicy` for this 
though. Is this along the lines of what you had in mind?

https://github.com/llvm/llvm-project/pull/169445
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to