[Lldb-commits] [PATCH] D73946: [lldb] Fix another instance where we pass a nullptr as TypeSourceInfo to NonTypeTemplateParmDecl::Create

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 18 04:29:34 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG40b2c7f29b44: [lldb] Fix another instance where we pass a nullptr as TypeSourceInfo to… (authored by teemperor).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73946/new/

https://reviews.llvm.org/D73946

Files:
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp


Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===================================================================
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1298,11 +1298,13 @@
 
     if (!template_param_infos.packed_args->args.empty() &&
         IsValueParam(template_param_infos.packed_args->args[0])) {
+      QualType template_param_type =
+          template_param_infos.packed_args->args[0].getIntegralType();
       template_param_decls.push_back(NonTypeTemplateParmDecl::Create(
           ast, decl_context, SourceLocation(), SourceLocation(), depth,
-          num_template_params, identifier_info,
-          template_param_infos.packed_args->args[0].getIntegralType(),
-          parameter_pack_true, nullptr));
+          num_template_params, identifier_info, template_param_type,
+          parameter_pack_true,
+          ast.getTrivialTypeSourceInfo(template_param_type)));
     } else {
       template_param_decls.push_back(TemplateTypeParmDecl::Create(
           ast, decl_context, SourceLocation(), SourceLocation(), depth,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73946.245122.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200218/6b2315e0/attachment.bin>


More information about the lldb-commits mailing list