Fixed generation of dependent template argument names (#146)

This commit is contained in:
Bartek Kryza
2023-05-20 11:40:12 +02:00
parent bca1162b16
commit 044c9ced19
3 changed files with 29 additions and 7 deletions

View File

@@ -484,10 +484,9 @@ void template_builder::argument_process_dispatch(
template_parameter template_builder::process_template_argument(
const clang::TemplateArgument &arg)
{
LOG_DBG("Processing template argument: {}", common::to_string(arg));
auto arg_name = common::to_string(arg);
auto arg_name =
arg.getAsTemplate().getAsTemplateDecl()->getQualifiedNameAsString();
LOG_DBG("Processing template argument: {}", arg_name);
return template_parameter::make_template_type(arg_name);
}
@@ -495,11 +494,14 @@ template_parameter template_builder::process_template_argument(
template_parameter template_builder::process_template_expansion(
const clang::TemplateArgument &arg)
{
LOG_DBG(
"Processing template expansion argument: {}", common::to_string(arg));
auto arg_name = common::to_string(arg);
auto arg_name =
arg.getAsTemplate().getAsTemplateDecl()->getQualifiedNameAsString();
LOG_DBG("Processing template expansion argument: {}", arg_name);
util::apply_if_not_null(
arg.getAsTemplate().getAsTemplateDecl(), [&arg_name](const auto *decl) {
arg_name = decl->getQualifiedNameAsString();
});
auto param = template_parameter::make_template_type(arg_name);
param.is_variadic(true);