forked from qt-creator/qt-creator
Changed ObjC message arguments to have SimpleName for the name part.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -100,6 +100,8 @@ protected:
|
||||
virtual bool visit(FunctionDeclaratorAST *ast);
|
||||
virtual bool visit(SimpleDeclarationAST *);
|
||||
virtual void endVisit(SimpleDeclarationAST *);
|
||||
virtual bool visit(ObjCSelectorWithoutArgumentsAST *ast);
|
||||
virtual bool visit(ObjCSelectorWithArgumentsAST *ast);
|
||||
|
||||
private:
|
||||
const Identifier *_id;
|
||||
|
||||
Reference in New Issue
Block a user