Skip to content
Snippets Groups Projects
Commit d586e139 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Search for the local usages after processing the function body.

parent 5c741218
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment