Commit 7bed5cd3 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

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

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: default avatarNikolai Kosjar <>
parent 873408c5
This diff is collapsed.
......@@ -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 <typename T, typename D = T>\n"
"struct Temp\n"
" struct Nested\n"
" {\n"
" template<typename U> static T* __test(...);\n"
" typedef decltype(__test<D>(0)) type;\n"
" };\n"
"struct Foo { int bar; };\n"
"void func()\n"
" Temp<Foo>::Nested::type s;\n"
" @\n"
) << _("s.") << (QStringList()
<< QLatin1String("Foo")
<< QLatin1String("bar"));
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