forked from qt-creator/qt-creator
C++: Fix decltype resolving for template function
The last nail for std::unique_ptr (GCC variant, MSVC still doesn't work).
Use-case:
template<typename T>
static T f();
struct Foo { int bar; };
void fun()
{
decltype(f<Foo>()) s;
s.bar; // bar not highlighted
}
Task-number: QTCREATORBUG-14483
Task-number: QTCREATORBUG-8937
Change-Id: I5bab757400b070cf9dbb688a44fd8eafe95ddc61
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
a429ef3d50
commit
07f8c474be
@@ -967,7 +967,7 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope,
|
||||
if (const TemplateNameId *instantiation = name->asTemplateNameId()) {
|
||||
if (Template *specialization = s->asTemplate()) {
|
||||
if (const Symbol *decl = specialization->declaration()) {
|
||||
if (decl->isFunction()) {
|
||||
if (decl->isFunction() || decl->isDeclaration()) {
|
||||
Clone cloner(_control.data());
|
||||
Subst subst(_control.data());
|
||||
initializeSubst(cloner, subst, binding, scope,
|
||||
|
||||
Reference in New Issue
Block a user