forked from qt-creator/qt-creator
CppEditor: Do not rely on object identity when comparing names
In particular, the same namespace can be declared in lots of different places. Fixes: QTCREATORBUG-25776 Change-Id: I7e255cee560043ed4beb47b8047f99c3a9c21198 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -3583,8 +3583,10 @@ protected:
|
||||
if (i.type()->isNamedType()) { // check if we have to search recursively
|
||||
const Name *newName = i.type()->asNamedType()->name();
|
||||
Scope *newScope = i.declaration()->enclosingScope();
|
||||
if (newName == name && newScope == scope)
|
||||
if (Matcher::match(newName, name)
|
||||
&& Matcher::match(newScope->name(), scope->name())) {
|
||||
continue; // we have found the start location of the search
|
||||
}
|
||||
return isValueType(newName, newScope, isValueType);
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user