================
@@ -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 << "'";
----------------
mizvekov wrote:

I think the problem is that it makes little sense to show the char as a char 
literal for this integral dumper.

This is a resolved argument, it's not supposed to print as-written anyway.

This dumper is a debugging aid and the most important things are showing the 
value and the type it had.
The suffixed literals are going to obscure any typedefs. The char literal is 
going to obscure the signed-ness of the char besides that.

The most helpful representation is the cast followed by the plain literal. Ie 
(uintptr_t)28999
I think we should have a mode in that literal printer for that.

This would remove the plain ugly case of the char literal, but still the single 
quotes can appear within the printed type of the literal, which can already 
happen anyway.

Shafik would that also alleviate your concern?



https://github.com/llvm/llvm-project/pull/93431
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to