Fixed local usage highlighting for ObjC message parameters.

This commit is contained in:
Erik Verbruggen
2010-02-10 22:45:28 +01:00
parent d7994a886f
commit 4df9b37542
3 changed files with 8 additions and 3 deletions

View File

@@ -411,6 +411,12 @@ protected:
accept(ast->argument_list); accept(ast->argument_list);
return false; return false;
} }
virtual bool visit(ObjCMessageArgumentDeclarationAST *ast)
{
accept(ast->param_name);
return false;
}
}; };

View File

@@ -694,8 +694,8 @@ bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
symbol->setStorage(methodTy->storage()); symbol->setStorage(methodTy->storage());
} }
symbol->setStartOffset(tokenAt(selector->firstToken()).offset); symbol->setStartOffset(tokenAt(ast->firstToken()).offset);
symbol->setEndOffset(tokenAt(selector->lastToken()).offset); symbol->setEndOffset(tokenAt(ast->lastToken()).offset);
symbol->setVisibility(semantic()->currentObjCVisibility()); symbol->setVisibility(semantic()->currentObjCVisibility());
_scope->enterSymbol(symbol); _scope->enterSymbol(symbol);

View File

@@ -265,7 +265,6 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast)
ObjCMethod *method = control()->newObjCMethod(location, ast->selector->selector_name); ObjCMethod *method = control()->newObjCMethod(location, ast->selector->selector_name);
ast->symbol = method; ast->symbol = method;
method->setSourceLocation(location);
method->setScope(_scope); method->setScope(_scope);
method->setVisibility(semantic()->currentVisibility()); method->setVisibility(semantic()->currentVisibility());
method->setReturnType(returnType); method->setReturnType(returnType);