https://github.com/mizvekov closed
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
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From fabcce0d7a4a1633b4d5ed49cb78fdf441e3c11e Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
@@ -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,
mizvekov wrote:
> Should we also be updating JSONNodeDumper.cpp at the same time?
We would ideally update it as well.
Not necessarily in the same PR, as it's a separate change that doesn't need to
be synchronized.
It's just not important to me, because I don't personally use the JSON dumper
@@ -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,
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void TextNodeDumpe
https://github.com/cor3ntin approved this pull request.
LGTM
(we should find better delimiters but it is out of scope for this change)
https://github.com/llvm/llvm-project/pull/93431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
@@ -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,
https://github.com/cor3ntin edited
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
@@ -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,
https://github.com/mizvekov edited
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
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void TextNodeDumpe
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void TextNodeDumpe
https://github.com/AaronBallman edited
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
https://github.com/AaronBallman commented:
Should we also be updating JSONNodeDumper.cpp at the same time?
https://github.com/llvm/llvm-project/pull/93431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
@@ -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,
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void TextNodeDumpe
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From 86e3852d0501bd24738c094359799c72781ad808 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void TextNodeDumpe
@@ -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,
@@ -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,
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void TextNodeDumpe
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const
TemplateArgument &) {
void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
OS << " type";
- dumpType(TA.getAsType());
+ dumpTemplateArgument(TA);
}
void TextNodeDumpe
@@ -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,
@@ -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,
https://github.com/cor3ntin edited
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
https://github.com/cor3ntin commented:
Thanks!
I think this is an improvement but we probably want to find a better syntax
than quotes
https://github.com/llvm/llvm-project/pull/93431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From f9892ebed002d73c74f44629e926386006f7bec1 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From 031e7c235ce5cbae31504c21eeecc7655fbd1566 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/93431
>From c23a96038a8233b44b49bc0a1d2a2475e4d2a8ae Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Fri, 24 May 2024 12:22:55 -0300
Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Matheus Izvekov (mizvekov)
Changes
This improves and unifies our approach to printing all template arguments.
The same approach to printing types is extended to all TemplateArguments: A
sugared version is printed in quotes, followed by pr
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/93431
This improves and unifies our approach to printing all template arguments.
The same approach to printing types is extended to all TemplateArguments: A
sugared version is printed in quotes, followed by printing
32 matches
Mail list logo