From 7bed5cd3b684c13fbf5b178a45cca1420acfe26d Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Fri, 22 May 2015 15:12:26 +0300 Subject: C++: Cleanup LookupContext Since the cache is now more reliable, some workarounds and optimizations in the instantiation process are not needed anymore. Also avoid instantiation of base classes when expandTemplates is disabled. As a bonus, we now resolve decltype of template function for a type that is not referenced anywhere but in the decltype. Change-Id: Idf42ba7280992db477c9aa62bb1815b27174594d Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/cppcompletion_test.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/plugins/cpptools/cppcompletion_test.cpp') diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index b4140d9065..b7ede1021c 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -3212,6 +3212,29 @@ void CppToolsPlugin::test_completion_data() ) << _("s.") << (QStringList() << QLatin1String("Foo") << QLatin1String("bar")); + + QTest::newRow("nested_instantiation_typedefed_decltype_declaration_of_template_function") << _( + "template \n" + "struct Temp\n" + "{\n" + " struct Nested\n" + " {\n" + " template static T* __test(...);\n" + " typedef decltype(__test(0)) type;\n" + " };\n" + "};\n" + "\n" + "struct Foo { int bar; };\n" + "\n" + "void func()\n" + "{\n" + " Temp::Nested::type s;\n" + " @\n" + "}\n" + ) << _("s.") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("bar")); + } void CppToolsPlugin::test_completion_member_access_operator() -- cgit v1.2.1