forked from qt-creator/qt-creator
Fixed local usage highlighting for ObjC message parameters.
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user