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>
This commit is contained in:
committed by
Nikolai Kosjar
parent
589945b7d3
commit
5416557a0b
@@ -675,7 +675,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);
|
||||
}
|
||||
}
|
||||
@@ -1580,10 +1580,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