[clang] [clang-tools-extra] [clang][TypePrinter] Unify printing of anonymous/unnamed tag types (PR #169445)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 2 08:39:53 PST 2025


================
@@ -4954,19 +4959,76 @@ void TagDecl::setQualifierInfo(NestedNameSpecifierLoc QualifierLoc) {
   }
 }
 
+void TagDecl::printAnonymousTagDecl(llvm::raw_ostream &OS,
+                                    const PrintingPolicy &Policy) const {
----------------
mizvekov wrote:

Probably just inline this into printName?

If you just invert the first `if` in printName, this would make the function barely any bigger.

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


More information about the cfe-commits mailing list