diff options
author | Przemyslaw Gorszkowski <pgorszkowski@gmail.com> | 2013-04-15 12:50:36 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-04-19 12:19:20 +0200 |
commit | 13913ed3913eac8b5fd0d63e4706c44223f65e4b (patch) | |
tree | 7e3a6e8c5b642df9d761343c43925246823bf24f /src/libs/cplusplus/ResolveExpression.cpp | |
parent | 357ffaa8bc563442dee8c17d8298936b62b500c6 (diff) | |
download | qt-creator-13913ed3913eac8b5fd0d63e4706c44223f65e4b.tar.gz |
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>
Diffstat (limited to 'src/libs/cplusplus/ResolveExpression.cpp')
-rw-r--r-- | src/libs/cplusplus/ResolveExpression.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libs/cplusplus/ResolveExpression.cpp b/src/libs/cplusplus/ResolveExpression.cpp index 029bcee00d..8a72fc1fc2 100644 --- a/src/libs/cplusplus/ResolveExpression.cpp +++ b/src/libs/cplusplus/ResolveExpression.cpp @@ -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 |