[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 13:32:49 PDT 2024


================
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) {
   });
 }
 
+void TextNodeDumper::dumpTemplateArgument(const TemplateArgument &TA) {
+  llvm::SmallString<128> Str;
+  {
+    llvm::raw_svector_ostream SS(Str);
+    TA.print(PrintPolicy, SS, /*IncludeType=*/true);
+  }
+  OS << " '" << Str << "'";
----------------
cor3ntin wrote:

Yes, lets keep the quotes. I'm not a fan but it appears consistent.

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


More information about the cfe-commits mailing list