C++: fix support for typedef of templated typedefs

Fix:
* code completion
* follow symbols
* find usages

Task-number: QTCREATORBUG-8375
Change-Id: Ia40273fec3dead76acad4695b852a9e53065d8a7
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Przemyslaw Gorszkowski
2013-04-15 12:50:36 +02:00
committed by Erik Verbruggen
parent b782d191cf
commit 564c9b2842
5 changed files with 218 additions and 5 deletions

View File

@@ -690,8 +690,15 @@ bool ResolveExpression::visit(CallAST *ast)
}
} else if (Function *funTy = ty->asFunctionType()) {
if (maybeValidPrototype(funTy, actualArgumentCount))
addResult(funTy->returnType().simplified(), scope);
if (maybeValidPrototype(funTy, actualArgumentCount)) {
LookupItem item;
item.setType(funTy->returnType().simplified());
item.setScope(scope);
// we have to remember a binding because it can be a template instantiation
item.setBinding(result.binding());
_results.append(item);
}
} else if (Class *classTy = ty->asClassType()) {
// Constructor call