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

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 09:45:13 PDT 2022


erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: clang/lib/AST/Decl.cpp:4480
+  // the tag is anonymous and we should print it differently.
+  if (Name.isIdentifier() && !Name.getAsIdentifierInfo()) {
+    // If the caller wanted to print a qualified name, they've already printed
----------------
Do we want to assert that this is either an EnumDecl, or a RecordDecl AND RD.isAnonymousStructOrUnion?


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