logic: template parameter as child nodes
* when generating the name hierarchy of a template parameter the parameter name is now an extra element that follows the template class/struct/function element.
This commit is contained in:
@@ -44,19 +44,7 @@ NameHierarchy CxxDeclNameResolver::getDeclNameHierarchy()
|
||||
|
||||
if (declName)
|
||||
{
|
||||
if ((clang::isa<clang::NonTypeTemplateParmDecl>(m_declaration) ||
|
||||
clang::isa<clang::TemplateTypeParmDecl>(m_declaration) ||
|
||||
clang::isa<clang::TemplateTemplateParmDecl>(m_declaration)) &&
|
||||
contextNameHierarchy.size() > 0)
|
||||
{
|
||||
std::string lastContextElementName = contextNameHierarchy.back()->getFullName(); // TODO: what about the signature in this case?
|
||||
contextNameHierarchy.pop();
|
||||
contextNameHierarchy.push(std::make_shared<NameElement>(lastContextElementName + "::" + declName->getFullName()));
|
||||
}
|
||||
else
|
||||
{
|
||||
contextNameHierarchy.push(declName);
|
||||
}
|
||||
contextNameHierarchy.push(declName);
|
||||
}
|
||||
}
|
||||
return contextNameHierarchy;
|
||||
|
||||
Reference in New Issue
Block a user