In GetPartiallyDesugaredTypeImpl fix type replacement.

When looking up in the list of type to be replaced by a typedef (basic_string -> string), use
the canonical type to make sure we have the right search (any sugar will make the search fail).
This commit is contained in:
Philippe Canal
2015-05-08 11:53:42 -05:00
committed by sftnight
parent 5aa38ee07a
commit 67ffd34dd5

View File

@ -988,7 +988,7 @@ namespace utils {
// Did we get to a basic_string, let's get back to std::string
Transform::Config::ReplaceCollection::const_iterator
iter = TypeConfig.m_toReplace.find(QT.getTypePtr());
iter = TypeConfig.m_toReplace.find(QT->getCanonicalTypeInternal().getTypePtr());
if (iter != TypeConfig.m_toReplace.end()) {
Qualifiers quals = QT.getQualifiers();
QT = QualType( iter->second, 0);