[Lldb-commits] [lldb] 12e8e3f - [lldb][CXXModuleHandler] Set TemplateArgument::IsDefaulted
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 27 08:39:39 PST 2023
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:
More information about the lldb-commits
mailing list