CppTools: Fix highlighting and follow for template using argument

Use-case:
template<class T>
using Foo = Bar<T>; // T not highlighted

Task-number: QTCREATORBUG-9944
Change-Id: I04cb62ea6a21f158f7fb4fb7ac79ccd6eb1bbfbb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-06-07 13:15:34 +03:00
committed by Nikolai Kosjar
parent 7389f46959
commit 3fe1b92566
4 changed files with 10 additions and 8 deletions

View File

@@ -423,12 +423,8 @@ Scope *CheckSymbols::enclosingScope() const
return funDef->symbol;
} else if (TemplateDeclarationAST *templateDeclaration = ast->asTemplateDeclaration()) {
if (DeclarationAST *decl = templateDeclaration->declaration) {
if (FunctionDefinitionAST *funDef = decl->asFunctionDefinition()) {
if (funDef->symbol)
return funDef->symbol;
}
}
if (templateDeclaration->symbol)
return templateDeclaration->symbol;
} else if (CompoundStatementAST *blockStmt = ast->asCompoundStatement()) {
if (blockStmt->symbol)