forked from qt-creator/qt-creator
C++: Guard against parent binding loop
Task-number: QTCREATORBUG-16146 Change-Id: Ib2a790954517859acd7ca5f16c7d889d28208fb0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This commit is contained in:
committed by
Erik Verbruggen
parent
c4f9c6f265
commit
a717e980e7
@@ -1513,7 +1513,12 @@ bool InternalCppCompletionAssistProcessor::globalCompletion(Scope *currentScope)
|
||||
}
|
||||
}
|
||||
|
||||
QSet<ClassOrNamespace *> processed;
|
||||
for (; currentBinding; currentBinding = currentBinding->parent()) {
|
||||
if (processed.contains(currentBinding))
|
||||
break;
|
||||
processed.insert(currentBinding);
|
||||
|
||||
foreach (ClassOrNamespace* u, currentBinding->usings())
|
||||
usingBindings.append(u);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user