Commit b514d4d7 authored by Przemyslaw Gorszkowski's avatar Przemyslaw Gorszkowski Committed by Nikolai Kosjar

C++: fix code completion for typedef of pointer array

Example:
struct Foo { int foo; };
typedef Foo *FooArr[10];

void func()
{
    FooArr arr;
    arr[0]-> // No completion
}

Task-number: QTCREATORBUG-12703
Change-Id: I1898dbf83eaa0a6dfa8c401390f28c78e5739bc4
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 4c6e02ed
This diff is collapsed.
......@@ -2342,6 +2342,17 @@ void CppToolsPlugin::test_completion_data()
) << _("s.t->") << (QStringList()
<< QLatin1String("foo")
<< QLatin1String("Foo"));
QTest::newRow("typedef_of_pointer_of_array_QTCREATORBUG-12703") << _(
"struct Foo { int foo; };\n"
"typedef Foo *FooArr[10];\n"
"void fun() {\n"
" FooArr arr;\n"
" @\n"
"}\n"
) << _("arr[0]->") << (QStringList()
<< QLatin1String("foo")
<< QLatin1String("Foo"));
}
void CppToolsPlugin::test_completion_member_access_operator()
......
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