forked from qt-creator/qt-creator
C++: Avoid duplicate entries in TypeResolver
Change-Id: I094dc04a14c05b17815d53bf0170926cc0c0d2a5 Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
5e0f0268ae
commit
d9eab81cbb
@@ -79,9 +79,11 @@ QList<LookupItem> TypeResolver::getNamedTypeItems(const Name *name, Scope *scope
|
|||||||
if (namedTypeItems.isEmpty()) {
|
if (namedTypeItems.isEmpty()) {
|
||||||
if (binding)
|
if (binding)
|
||||||
namedTypeItems = binding->lookup(name);
|
namedTypeItems = binding->lookup(name);
|
||||||
if (LookupScope *scopeCon = _context.lookupType(scope))
|
if (LookupScope *scopeCon = _context.lookupType(scope)) {
|
||||||
|
if (scopeCon != binding)
|
||||||
namedTypeItems += scopeCon->lookup(name);
|
namedTypeItems += scopeCon->lookup(name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return namedTypeItems;
|
return namedTypeItems;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user