In TypeName::GetFullyQualifiedType, strip SubstTemplateTypeParmType.
When the type comes (directly or indirectly) from being used as a template paramater, it is decorated by SubstTemplateTypeParmType which gets in the way of properly getting the name correct (leads to 'std::const string'.
This commit is contained in:
parent
df44a9d01d
commit
f1fd8d0fd0
@ -1515,6 +1515,19 @@ namespace utils {
|
||||
return QT;
|
||||
}
|
||||
|
||||
// Remove the part of the type related to the type being a template
|
||||
// parameter (we won't report it as part of the 'type name' and it is
|
||||
// actually make the code below to be more complex (to handle those)
|
||||
while (isa<SubstTemplateTypeParmType>(QT.getTypePtr())) {
|
||||
// Get the qualifiers.
|
||||
Qualifiers quals = QT.getQualifiers();
|
||||
|
||||
QT = dyn_cast<SubstTemplateTypeParmType>(QT.getTypePtr())->desugar();
|
||||
|
||||
// Add back the qualifiers.
|
||||
QT = Ctx.getQualifiedType(QT, quals);
|
||||
}
|
||||
|
||||
NestedNameSpecifier* prefix = 0;
|
||||
Qualifiers prefix_qualifiers;
|
||||
if (const ElaboratedType* etype_input
|
||||
|
Loading…
Reference in New Issue
Block a user