forked from qt-creator/qt-creator
C++: nested class in function
Case when nested class declaration contains object name for this class.
Example:
void fun()
{
struct S
{
int i;
} s;
s.i;
}
Fixes:
* highlighting
* completion
* tests
Task-number: QTCREATORBUG-11710
Change-Id: I32e234f57655c388a87a199edc8be750d7bf823f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
46c083c2eb
commit
e3f5977311
@@ -1441,6 +1441,19 @@ void CppToolsPlugin::test_completion_data()
|
||||
<< QLatin1String("A")
|
||||
<< QLatin1String("a"));
|
||||
|
||||
QTest::newRow("nested_class_declaration_with_object_name_inside_function") << _(
|
||||
"int foo()\n"
|
||||
"{\n"
|
||||
" struct Nested\n"
|
||||
" {\n"
|
||||
" int i;\n"
|
||||
" } n;\n"
|
||||
" @;\n"
|
||||
"}\n"
|
||||
) << _("n.") << (QStringList()
|
||||
<< QLatin1String("Nested")
|
||||
<< QLatin1String("i"));
|
||||
|
||||
QTest::newRow("nested_anonymous_class_QTCREATORBUG10876_1") << _(
|
||||
"struct EnclosingStruct\n"
|
||||
"{\n"
|
||||
|
||||
Reference in New Issue
Block a user