[llvm-branch-commits] [clang] [clang-tools-extra] [clang] implement CWG1980 / part 2 of #190495 : trivial changes (PR #207865)

Matheus Izvekov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jul 7 08:02:15 PDT 2026


================
@@ -1791,8 +1791,16 @@ void JSONNodeDumper::VisitTemplateExpansionTemplateArgument(
 void JSONNodeDumper::VisitExpressionTemplateArgument(
     const TemplateArgument &TA) {
   JOS.attribute("isExpr", true);
-  if (TA.isCanonicalExpr())
-    JOS.attribute("isCanonical", true);
+  if (auto Kind = TA.getExprCanonKind()) {
+    switch (*Kind) {
+    case CanonicalizationKind::Structural:
+      JOS.attribute("CanonicalKind", "Structural");
+      break;
+    case CanonicalizationKind::Functional:
+      JOS.attribute("CanonicalKind", "Functional");
+      break;
+    }
+  }
----------------
mizvekov wrote:

You mean `clang/lib/AST/TextNodeDumper.cpp` ? They are in the other PR, I missed moving it to this one.

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


More information about the llvm-branch-commits mailing list