Fix to selector parameter position.

This commit is contained in:
Erik Verbruggen
2009-12-29 18:26:01 +01:00
parent 5723682b21
commit eb1baa9e2e
3 changed files with 10 additions and 9 deletions

View File

@@ -666,22 +666,22 @@ bool CheckDeclaration::visit(ObjCMethodDeclarationAST *ast)
return false;
FullySpecifiedType ty = semantic()->check(ast->method_prototype, _scope);
ObjCMethod *methodType = ty.type()->asObjCMethodType();
if (!methodType)
ObjCMethod *methodTy = ty.type()->asObjCMethodType();
if (!methodTy)
return false;
Symbol *symbol;
if (ast->function_body) {
if (!semantic()->skipFunctionBodies()) {
semantic()->check(ast->function_body, methodType->members());
semantic()->check(ast->function_body, methodTy->members());
}
symbol = methodType;
symbol = methodTy;
} else {
Declaration *decl = control()->newDeclaration(ast->firstToken(), methodType->name());
decl->setType(methodType);
Declaration *decl = control()->newDeclaration(ast->firstToken(), methodTy->name());
decl->setType(methodTy);
symbol = decl;
symbol->setStorage(methodType->storage());
symbol->setStorage(methodTy->storage());
}
symbol->setStartOffset(tokenAt(ast->firstToken()).offset);