forked from qt-creator/qt-creator
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: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
4c6e02ed99
commit
b514d4d7b2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user