diff --git a/src/libs/cplusplus/TypeResolver.cpp b/src/libs/cplusplus/TypeResolver.cpp index 5e5249f2e19..10c69864dbc 100644 --- a/src/libs/cplusplus/TypeResolver.cpp +++ b/src/libs/cplusplus/TypeResolver.cpp @@ -79,8 +79,10 @@ QList TypeResolver::getNamedTypeItems(const Name *name, Scope *scope if (namedTypeItems.isEmpty()) { if (binding) namedTypeItems = binding->lookup(name); - if (LookupScope *scopeCon = _context.lookupType(scope)) - namedTypeItems += scopeCon->lookup(name); + if (LookupScope *scopeCon = _context.lookupType(scope)) { + if (scopeCon != binding) + namedTypeItems += scopeCon->lookup(name); + } } return namedTypeItems;