Process the formal arguments of inline methods when searching the usages of a symbol.

This commit is contained in:
Roberto Raggi
2010-02-11 10:18:05 +01:00
parent 6162279630
commit 75229edcf9
2 changed files with 10 additions and 7 deletions

View File

@@ -69,6 +69,7 @@ void FindUsages::operator()(Symbol *symbol)
_references.clear();
_usages.clear();
_declSymbol = symbol;
_inSimpleDeclaration = 0;
_id = 0;
if (_declSymbol && 0 != (_id = _declSymbol->identifier()))
@@ -450,14 +451,17 @@ bool FindUsages::visit(FunctionDeclaratorAST *ast)
return false;
}
bool FindUsages::visit(SimpleDeclarationAST *)
bool FindUsages::visit(SimpleDeclarationAST *ast)
{
++_inSimpleDeclaration;
return true;
}
for (SpecifierListAST *it = ast->decl_specifier_list; it; it = it->next)
accept(it->value);
void FindUsages::endVisit(SimpleDeclarationAST *)
{ --_inSimpleDeclaration; }
++_inSimpleDeclaration;
for (DeclaratorListAST *it = ast->declarator_list; it; it = it->next)
accept(it->value);
--_inSimpleDeclaration;
return false;
}
bool FindUsages::visit(ObjCSelectorWithoutArgumentsAST *ast)
{