forked from qt-creator/qt-creator
C++: Fix resolving of templated partial specialization
Use-case:
template<class T> struct t {};
template<class> struct s { float f; };
template<class X> struct s<t<X>> { int i; };
void f()
{
s<t<char>> var;
var.i; // i not highlighted
}
Task-number: QTCREATORBUG-14034
Change-Id: I5d00bc3247352fca4af4c41a47c208ec3e193c8e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
2070431d8c
commit
ec4d242bb3
@@ -1215,6 +1215,13 @@ LookupScopePrivate *LookupScopePrivate::findSpecialization(
|
||||
|
||||
if (specializationTemplateArgument == initializationTemplateArgument)
|
||||
return cit->second;
|
||||
|
||||
if (const NamedType *specName = specializationTemplateArgument->asNamedType()) {
|
||||
if (const NamedType *initName = initializationTemplateArgument->asNamedType()) {
|
||||
if (specName->name()->identifier() == initName->name()->identifier())
|
||||
return cit->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user