[clang] [clang][TypePrinter] Unify printing of anonymous/unnamed tag types (PR #169445)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 24 20:24:56 PST 2025
https://github.com/mizvekov commented:
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.
https://github.com/llvm/llvm-project/pull/169445
More information about the cfe-commits
mailing list