C++: fix support for typedef of templated typedefs

Fix:
* code completion
* follow symbols
* find usages

Task-number: QTCREATORBUG-8375
Change-Id: I6f35e809ba15f224c5a6d9b2fcfc18dbfba55411
Reviewed-by: Sergey Shambir <sergey.shambir.auto@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 357ffaa8bc
commit 13913ed391
5 changed files with 140 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