Fixed handling of anonymous template parameters

This commit is contained in:
Bartek Kryza
2023-05-13 14:57:41 +02:00
parent 2223f595cd
commit 3b573ff034
6 changed files with 34 additions and 17 deletions

View File

@@ -197,6 +197,10 @@ std::optional<std::string> template_parameter::name() const
if (!name_)
return {};
if (kind_ == template_parameter_kind_t::template_type &&
name_.has_value() && name_.value().empty())
return "typename";
if (is_variadic_ && (kind_ != template_parameter_kind_t::non_type_template))
return name_.value() + "...";