[PATCH] D134813: Properly print unnamed TagDecl objects in diagnostics

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 8 06:11:39 PDT 2023


Hahnfeld added a comment.

In D134813#4482822 <https://reviews.llvm.org/D134813#4482822>, @aaron.ballman wrote:

> In D134813#4482819 <https://reviews.llvm.org/D134813#4482819>, @Hahnfeld wrote:
>
>> Thanks! Note that the same probably holds true (but I didn't test) for all other classes that override `printName(raw_ostream &OS, const PrintingPolicy &Policy)`, ie `DecompositionDecl`, `MSGuidDecl`, `UnnamedGlobalConstantDecl`, and `TemplateParamObjectDecl`.
>
> You're correct, but I figured those are somewhat uncommon AST nodes, so we can probably expose those APIs as-needed rather than doing all of them.

Oh, alright.

> However, if you prefer they all get handled, it's easy enough!

No, not needed. I was only running into it with an `EnumDecl` while going to LLVM 16. But as I said, it's easy enough to work around.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134813/new/

https://reviews.llvm.org/D134813



More information about the cfe-commits mailing list