forked from qt-creator/qt-creator
C++: Fix endless loop in lookup on Windows
...for templates with typedefs referencing the respectively other
template (basic_ostream <-> ostreambuf_iterator).
Tested with MSVC 2013.
Regression introduced by ba42ceb0cb.
Task-number: QTCREATORBUG-13064
Task-number: QTCREATORBUG-13065
Change-Id: I71a45c720663a73c3302eb7da731e6ad2d8f0fbd
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -92,7 +92,10 @@ static bool isNestedInstantiationEnclosingTemplate(
|
||||
ClassOrNamespace *nestedClassOrNamespaceInstantiation,
|
||||
ClassOrNamespace *enclosingTemplateClassInstantiation)
|
||||
{
|
||||
while (enclosingTemplateClassInstantiation) {
|
||||
QList<ClassOrNamespace *> processed;
|
||||
while (enclosingTemplateClassInstantiation
|
||||
&& !processed.contains(enclosingTemplateClassInstantiation)) {
|
||||
processed.append(enclosingTemplateClassInstantiation);
|
||||
if (enclosingTemplateClassInstantiation == nestedClassOrNamespaceInstantiation)
|
||||
return false;
|
||||
enclosingTemplateClassInstantiation = enclosingTemplateClassInstantiation->parent();
|
||||
|
||||
Reference in New Issue
Block a user