Commit 75229edc authored by Roberto Raggi's avatar Roberto Raggi
Browse files

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

parent 61622796
......@@ -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,15 +451,18 @@ bool FindUsages::visit(FunctionDeclaratorAST *ast)
return false;
}
bool FindUsages::visit(SimpleDeclarationAST *)
bool FindUsages::visit(SimpleDeclarationAST *ast)
{
for (SpecifierListAST *it = ast->decl_specifier_list; it; it = it->next)
accept(it->value);
++_inSimpleDeclaration;
return true;
for (DeclaratorListAST *it = ast->declarator_list; it; it = it->next)
accept(it->value);
--_inSimpleDeclaration;
return false;
}
void FindUsages::endVisit(SimpleDeclarationAST *)
{ --_inSimpleDeclaration; }
bool FindUsages::visit(ObjCSelectorWithoutArgumentsAST *ast)
{
const Identifier *id = identifier(ast->name_token);
......
......@@ -99,7 +99,6 @@ protected:
virtual bool visit(ExpressionOrDeclarationStatementAST *ast);
virtual bool visit(FunctionDeclaratorAST *ast);
virtual bool visit(SimpleDeclarationAST *);
virtual void endVisit(SimpleDeclarationAST *);
virtual bool visit(ObjCSelectorWithoutArgumentsAST *ast);
virtual bool visit(ObjCSelectorWithArgumentsAST *ast);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment