forked from qt-creator/qt-creator
Search for the local usages after processing the function body.
This commit is contained in:
@@ -528,6 +528,12 @@ void CheckSymbols::endVisit(TemplateDeclarationAST *)
|
||||
bool CheckSymbols::visit(FunctionDefinitionAST *ast)
|
||||
{
|
||||
_functionDefinitionStack.append(ast);
|
||||
|
||||
accept(ast->decl_specifier_list);
|
||||
accept(ast->declarator);
|
||||
accept(ast->ctor_initializer);
|
||||
accept(ast->function_body);
|
||||
|
||||
const LocalSymbols locals(_doc, ast);
|
||||
QList<SemanticInfo::Use> uses;
|
||||
foreach (uses, locals.uses) {
|
||||
@@ -535,11 +541,6 @@ bool CheckSymbols::visit(FunctionDefinitionAST *ast)
|
||||
addTypeUsage(u);
|
||||
}
|
||||
|
||||
accept(ast->decl_specifier_list);
|
||||
accept(ast->declarator);
|
||||
accept(ast->ctor_initializer);
|
||||
accept(ast->function_body);
|
||||
|
||||
_functionDefinitionStack.removeLast();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user