[PATCH] D134303: [AST] Preserve more structure in UsingEnumDecl node.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 11:05:23 PDT 2022


sammccall added a comment.

In D134303#3823620 <https://reviews.llvm.org/D134303#3823620>, @urnathan wrote:

> Does this still apply with the fix for dr2621 landed?

Not cleanly, as getType already creates the ElaboratedTypeLoc for the qualifier but without the `enum` keyword. Wrapping it with a second ElaboratedType isn't consistent with how these types are modeled elsewhere in the AST. Plumbing through parameters to make getType() add the elaborated-type-keyword seems disproportionately invasive.
I think probably it's best just to drop the idea that "enum" is part of a tag name (especially since now the name can be a typedef) and keep treating it as an extra SourceLocation instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134303



More information about the cfe-commits mailing list