diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-04-24 09:55:20 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2015-05-15 14:21:45 +0000 |
commit | 9b30795c02ac659606304f1a101279cd66af5c07 (patch) | |
tree | 67a9d988af34cb2f3701302d89a330a07350e12c /src/plugins/cpptools/cppcompletion_test.cpp | |
parent | ee37f60bffb14fc20abe63b812dc3b8f20974fe1 (diff) | |
download | qt-creator-9b30795c02ac659606304f1a101279cd66af5c07.tar.gz |
C++: Fix lookup for instantiation by class object
Task-number: QTCREATORBUG-14352
Change-Id: I2ce4bc1d0dba2414afe050e80607b581686081a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cppcompletion_test.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcompletion_test.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index 5e9d09a384..8bceee424d 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -332,7 +332,6 @@ void CppToolsPlugin::test_completion() QEXPECT_FAIL("enum_in_function_in_struct_in_function_anon", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_class_accessed_in_member_func_cxx11", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_class_accessed_in_member_func_inline_cxx11", "QTCREATORBUG-13757", Abort); - QEXPECT_FAIL("pointer_indirect_specialization_double_indirection", "QTCREATORBUG-14141", Abort); QEXPECT_FAIL("pointer_indirect_specialization_double_indirection_with_base", "QTCREATORBUG-14141", Abort); QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort); QCOMPARE(actualCompletions, expectedCompletions); @@ -2830,6 +2829,28 @@ void CppToolsPlugin::test_completion_data() << QLatin1String("Foo") << QLatin1String("bar")); + QTest::newRow("instantiation_of_indirect_typedef") << _( + "template<typename _Tp>\n" + "struct Indirect { _Tp t; };\n" + "\n" + "template<typename T>\n" + "struct Temp\n" + "{\n" + " typedef T MyT;\n" + " typedef Indirect<MyT> indirect;\n" + "};\n" + "\n" + "struct Foo { int bar; };\n" + "\n" + "void func()\n" + "{\n" + " Temp<Foo>::indirect i;\n" + " @\n" + "}\n" + ) << _("i.t.") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("bar"));; + QTest::newRow("pointer_indirect_specialization_double_indirection_with_base") << _( "template<typename _Tp>\n" "struct Traits { };\n" |