[clang] [Clang][TypePrinter] Make printNestedNameSpecifier look at typedefs (PR #169364)

Aiden Grossman via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 24 09:35:51 PST 2025


================
@@ -1790,7 +1790,9 @@ void NamedDecl::printNestedNameSpecifier(raw_ostream &OS,
       else
         OS << *ND;
     } else if (const auto *RD = dyn_cast<RecordDecl>(DC)) {
-      if (!RD->getIdentifier())
+      if (TypedefNameDecl *Typedef = RD->getTypedefNameForAnonDecl())
+        OS << Typedef->getIdentifier()->getName();
----------------
boomanaiden154 wrote:

Ah, yep. Thanks!

https://github.com/llvm/llvm-project/pull/169364


More information about the cfe-commits mailing list