Commit 697ec700 authored by Nikolai Kosjar's avatar Nikolai Kosjar

Revert "C++: nested class with enclosing template class"

This reverts commit 5d76b433 since it
might lead to an infinite loop.

Task-number: QTCREATORBUG-11999
Change-Id: I12c7f3afc4aa53a83ddc2bf2d33eb76c29b747ee
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 966f2aeb
......@@ -1268,7 +1268,6 @@ void ClassOrNamespace::NestedClassInstantiator::instantiate(ClassOrNamespace *en
}
}
nestedClassOrNamespaceInstantiation->_parent = enclosingTemplateClassInstantiation;
instantiate(nestedClassOrNamespace, nestedClassOrNamespaceInstantiation);
enclosingTemplateClassInstantiation->_classOrNamespaces[nestedName] =
......
......@@ -901,6 +901,17 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_data()
" void foo();\n"
"};\n"
);
QTest::newRow("infiniteLoopLocalTypedef_QTCREATORBUG-11999") << _(
"template<class MyTree>\n"
"class TreeConstIterator\n"
"{\n"
" typedef TreeConstIterator<MyTree> MyIter;\n"
" void f() { return this->@$g(); }\n"
"};\n"
"\n"
"void h() { typedef TreeConstIterator<MyBase> const_iterator; }\n"
);
}
void CppEditorPlugin::test_FollowSymbolUnderCursor()
......
......@@ -304,6 +304,8 @@ void CppToolsPlugin::test_completion()
expectedCompletions.sort();
QEXPECT_FAIL("enum_in_function_in_struct_in_function", "doesn't work", Abort);
QEXPECT_FAIL("nested_class_in_template_class_QTCREATORBUG-11752",
"related to infiniteLoopLocalTypedef_QTCREATORBUG-11999", Abort);
QCOMPARE(actualCompletions, expectedCompletions);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment