forked from qt-creator/qt-creator
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 <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
31cad45c0e
commit
6bf75acac7
@@ -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 <typename T>\n"
|
||||
|
||||
Reference in New Issue
Block a user