diff options
author | Przemyslaw Gorszkowski <pgorszkowski@gmail.com> | 2014-04-01 10:32:13 +0200 |
---|---|---|
committer | Przemyslaw Gorszkowski <pgorszkowski@gmail.com> | 2014-04-04 12:11:19 +0200 |
commit | 5d76b4339a717cd944c4a3c27eac860b8111d645 (patch) | |
tree | f042c434a9cd807553b90db2deb53bc35c440dc0 /src/plugins/cpptools | |
parent | df5d9f99fbff91c4bea44264db1a3e4f56848ac1 (diff) |
C++: nested class with enclosing template class
The parent of instantiation of nested class of template class
should be the instantiation of enclosing template class.
Task-number: QTCREATORBUG-11752
Change-Id: I8875c738848b85731f5ea88a60da190b4b0ad18f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/cpptools')
-rw-r--r-- | src/plugins/cpptools/cppcompletion_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index d87f6719512..2b729b254f0 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -2233,6 +2233,22 @@ void CppToolsPlugin::test_completion_data() " double val = @\n" "}\n" ) << _("d.constBegin()->") << (QStringList()); + + QTest::newRow("nested_class_in_template_class_QTCREATORBUG-11752") << _( + "template <typename T>\n" + "struct Temp\n" + "{\n" + " struct Nested1 { T t; };\n" + " struct Nested2 { Nested1 n1; };\n" + "};\n" + "struct Foo { int foo; };\n" + "void fun() {\n" + " Temp<Foo>::Nested2 n2;\n" + " @\n" + "}\n" + ) << _("n2.n1.t.") << (QStringList() + << QLatin1String("foo") + << QLatin1String("Foo")); } void CppToolsPlugin::test_completion_member_access_operator() |