forked from qt-creator/qt-creator
C++: fix findusage for member of typedefed anonymous struct
Task-number: QTCREATORBUG-11859
Task-number: QTCREATORBUG-11860
Change-Id: I7484b3b88daefbb3c76bb86a9b573e8291072872
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
(cherry picked from commit 5416557a0b)
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
b455518c38
commit
df5d9f99fb
@@ -686,7 +686,7 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding
|
||||
for (; cit != citEnd; ++cit) {
|
||||
const AnonymousNameId *anonymousNameId = cit.key();
|
||||
ClassOrNamespace *a = cit.value();
|
||||
if (!binding->_declaredAnonymouses.contains(anonymousNameId))
|
||||
if (!binding->_declaredOrTypedefedAnonymouses.contains(anonymousNameId))
|
||||
lookup_helper(name, a, result, processed, binding->_templateId);
|
||||
}
|
||||
}
|
||||
@@ -1591,10 +1591,11 @@ bool CreateBindings::visit(Declaration *decl)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (Class *clazz = decl->type()->asClassType()) {
|
||||
}
|
||||
if (Class *clazz = decl->type()->asClassType()) {
|
||||
if (const Name *name = clazz->name()) {
|
||||
if (const AnonymousNameId *anonymousNameId = name->asAnonymousNameId())
|
||||
_currentClassOrNamespace->_declaredAnonymouses.insert(anonymousNameId);
|
||||
_currentClassOrNamespace->_declaredOrTypedefedAnonymouses.insert(anonymousNameId);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user