[Lldb-commits] [clang] [lldb] [clang] DeducedTypes deduction kind fix and improvement (PR #186727)

Matheus Izvekov via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 3 09:53:43 PDT 2026


================
@@ -2227,17 +2227,33 @@ void TextNodeDumper::VisitSubstTemplateTypeParmPackType(
   VisitTemplateTypeParmDecl(T->getReplacedParameter());
 }
 
-void TextNodeDumper::VisitAutoType(const AutoType *T) {
-  if (T->isDecltypeAuto())
-    OS << " decltype(auto)";
-  if (!T->isDeduced())
+void TextNodeDumper::VisitDeducedType(const DeducedType *T) {
+  switch (T->getDeducedKind()) {
+  case DeducedKind::Undeduced:
     OS << " undeduced";
+    break;
+  case DeducedKind::Deduced:
+    break;
+  case DeducedKind::DeducedAsDependent:
+    OS << " deduced-as-dependent";
+    break;
+  case DeducedKind::DeducedAsPack:
+    OS << " deduced-as-pack";
----------------
mizvekov wrote:

This is reasonably tested. The deduced-as-pack case is pretty hard to come by naturally as you would somehow have to dump the type of a capture of a lambda using an init-capture-pack, and I don't think you can do that from just an ast-dump invocation, you would have to be debugging it.

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


More information about the lldb-commits mailing list