Changed ObjC message arguments to have SimpleName for the name part.

This commit is contained in:
Erik Verbruggen
2010-02-08 09:34:51 +01:00
parent 4a652f6eca
commit b58cb740e5
12 changed files with 104 additions and 64 deletions

View File

@@ -458,3 +458,30 @@ bool FindUsages::visit(SimpleDeclarationAST *)
void FindUsages::endVisit(SimpleDeclarationAST *)
{ --_inSimpleDeclaration; }
bool FindUsages::visit(ObjCSelectorWithoutArgumentsAST *ast)
{
const Identifier *id = identifier(ast->name_token);
if (id == _id) {
LookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->selector_name);
reportResult(ast->name_token, candidates);
}
return false;
}
bool FindUsages::visit(ObjCSelectorWithArgumentsAST *ast)
{
for (ObjCSelectorArgumentListAST *iter = ast->selector_argument_list; iter;
iter = iter->next) {
const Identifier *id = identifier(iter->value->name_token);
if (id == _id) {
LookupContext context = currentContext(iter->value);
const QList<Symbol *> candidates = context.resolve(ast->selector_name);
reportResult(iter->value->name_token, candidates);
}
}
return false;
}