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

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

Task-number: QTCREATORBUG-11999
Change-Id: I12c7f3afc4aa53a83ddc2bf2d33eb76c29b747ee
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Nikolai Kosjar
2014-04-08 09:11:10 -04:00
parent 966f2aebc4
commit 697ec70037
3 changed files with 13 additions and 1 deletions

View File

@@ -1268,7 +1268,6 @@ void ClassOrNamespace::NestedClassInstantiator::instantiate(ClassOrNamespace *en
}
}
nestedClassOrNamespaceInstantiation->_parent = enclosingTemplateClassInstantiation;
instantiate(nestedClassOrNamespace, nestedClassOrNamespaceInstantiation);
enclosingTemplateClassInstantiation->_classOrNamespaces[nestedName] =

View File

@@ -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()

View File

@@ -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);
}