forked from OSchip/llvm-project
[lldb] Fix another instance where we pass a nullptr as TypeSourceInfo to NonTypeTemplateParmDecl::Create
Summary: Follow up to an issue pointed out in the review of D73808. We shouldn't just pass in a nullptr TypeSourceInfo in case Clang decided to access it. Reviewers: shafik, vsk Reviewed By: shafik, vsk Subscribers: kristof.beyls, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73946
This commit is contained in:
parent
db23825970
commit
40b2c7f29b
|
@ -1298,11 +1298,13 @@ static TemplateParameterList *CreateTemplateParameterList(
|
|||
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue