[Lldb-commits] [PATCH] D142714: [lldb][CXXModuleHandler] Set TemplateArgument::IsDefaulted

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 27 06:19:26 PST 2023


Michael137 created this revision.
Michael137 added reviewers: aprantl, labath.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Since https://reviews.llvm.org/D141827 this field gets used
to print type names. Thus propagate it after importing TemplateArguments
from modules.

**Testing**

- Confirmed that this fixes the ongoing `import-std-module` test failures.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142714

Files:
  lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp


Index: lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
@@ -239,7 +239,8 @@
         LLDB_LOG_ERROR(log, type.takeError(), "Couldn't import type: {0}");
         return std::nullopt;
       }
-      imported_args.push_back(TemplateArgument(*type));
+      imported_args.push_back(
+          TemplateArgument(*type, /*isNullPtr*/ false, arg.getIsDefaulted()));
       break;
     }
     case TemplateArgument::Integral: {
@@ -250,8 +251,8 @@
         LLDB_LOG_ERROR(log, type.takeError(), "Couldn't import type: {0}");
         return std::nullopt;
       }
-      imported_args.push_back(
-          TemplateArgument(d->getASTContext(), integral, *type));
+      imported_args.push_back(TemplateArgument(d->getASTContext(), integral,
+                                               *type, arg.getIsDefaulted()));
       break;
     }
     default:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142714.492731.patch
Type: text/x-patch
Size: 1068 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230127/4d101d8b/attachment.bin>


More information about the lldb-commits mailing list