return true;
}
+ if (!self->blocks_count) {
+ asterror(ast_ctx(self), "function `%s` has no body", self->name);
+ return false;
+ }
+
self->curblock = ir_function_create_block(irf, "entry");
if (!self->curblock)
return false;
else
{
/* error("missing return"); */
+ asterror(ast_ctx(self), "function `%s` missing return value", self->name);
return false;
}
}
/* for a binstore we need both an lvalue and an rvalue for the left side */
/* rvalue of destination! */
cgen = self->dest->expression.codegen;
- if (!(*cgen)((ast_expression*)(self->dest), func, true, &leftr))
+ if (!(*cgen)((ast_expression*)(self->dest), func, false, &leftr))
return false;
/* source as rvalue only */