Author: Michael Buch
Date: 2023-01-27T16:39:18Z
New Revision: 12e8e3fe90c976d08d466b24ce21a7f7e86f4249

URL: 
https://github.com/llvm/llvm-project/commit/12e8e3fe90c976d08d466b24ce21a7f7e86f4249
DIFF: 
https://github.com/llvm/llvm-project/commit/12e8e3fe90c976d08d466b24ce21a7f7e86f4249.diff

LOG: [lldb][CXXModuleHandler] Set TemplateArgument::IsDefaulted

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.

Differential Revision: https://reviews.llvm.org/D142714

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp 
b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
index 3eda04dc022a7..c201153fd7ceb 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
@@ -239,7 +239,8 @@ std::optional<Decl *> 
CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) {
         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 @@ std::optional<Decl *> 
CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) {
         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:


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to