Remove full_name() function

Doesn't work for templates.
This commit is contained in:
Jonathan Müller 2017-04-13 11:35:22 +02:00
commit 6894a025ca
3 changed files with 19 additions and 24 deletions

View file

@ -42,21 +42,3 @@ bool cppast::is_templated(const cpp_entity& e) noexcept
return false;
return e.parent().value().name() == e.name();
}
std::string cppast::full_name(const cpp_entity& e)
{
if (e.name().empty())
return "";
else if (is_parameter(e.kind()))
// parameters don't have a full name
return e.name();
std::string scopes;
for (auto cur = e.parent(); cur; cur = cur.value().parent())
// prepend each scope, if there is any
type_safe::with(cur.value().scope_name(),
[&](const std::string& cur_scope) { scopes = cur_scope + "::" + scopes; });
return scopes + e.name();
}