From 6bf75acac7ace2b5b5bdc156c48da85d76e985fd Mon Sep 17 00:00:00 2001 From: Przemyslaw Gorszkowski Date: Fri, 14 Mar 2014 08:24:54 +0100 Subject: C++: fix support for nested anonymous class The case when anonymous class is inside function. Fixed: * highlighting * completion Task-number: QTCREATORBUG-11711 Change-Id: Ic8fc5fdfb1aed62a74bf148ab7ed449d08214dda Reviewed-by: Orgad Shaneh Reviewed-by: Nikolai Kosjar Reviewed-by: Erik Verbruggen --- src/plugins/cpptools/cppcompletion_test.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/plugins/cpptools/cppcompletion_test.cpp') diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index bf8fb0f772..d87f671951 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -1513,6 +1513,20 @@ void CppToolsPlugin::test_completion_data() ) << _("nestedOfNestedAnonymousClass.") << (QStringList() << QLatin1String("memberOfNestedOfNestedAnonymousClass")); + QTest::newRow("nested_anonymous_class_inside_function") << _( + "void fun()\n" + "{\n" + " union\n" + " {\n" + " int foo1;\n" + " int foo2;\n" + " };\n" + " @\n" + "};\n" + ) << _("foo") << (QStringList() + << QLatin1String("foo1") + << QLatin1String("foo2")); + QTest::newRow("crash_cloning_template_class_QTCREATORBUG9329") << _( "struct A {};\n" "template \n" -- cgit v1.2.1