diff options
Diffstat (limited to 'src/move.c')
| -rw-r--r-- | src/move.c | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -140,7 +140,8 @@ static void forget_references(struct state *state) static int mvcheck_expr(struct state *state, struct ast *node); static int mvcheck_expr_list(struct state *state, struct ast *nodes); -static int mvcheck_statements(struct state *state, struct ast *nodes, bool last); +static int mvcheck_statements(struct state *state, struct ast *nodes, + bool last); static int refcheck_id(struct state *state, struct ast *node) { @@ -176,7 +177,8 @@ static int refcheck(struct state *state, struct ast *node) case AST_ID: return refcheck_id(state, node); default: internal_error("unhandled node %s for refcheck", - ast_str(node->k)); + ast_str(node->k) + ); return -1; } @@ -213,7 +215,9 @@ static int total_check_single(struct state *state, struct scope *scope) if (prev) continue; - semantic_warn(scope, def, "%s not moved, might leak", var_id(def)); + semantic_warn(scope, def, "%s not moved, might leak", + var_id(def) + ); ret |= 1; } @@ -304,7 +308,8 @@ static int mvcheck_call(struct state *state, struct ast *node, bool last) if (!last && (groups > 0)) { semantic_error(node->scope, node, - "calls with closures must currently be exit points, sorry!"); + "calls with closures must currently be exit points, sorry!" + ); return -1; } @@ -390,7 +395,8 @@ static int mvcheck_id(struct state *state, struct ast *node) if (in_pure(state)) { semantic_error(node->scope, node, - "move in pure context not allowed"); + "move in pure context not allowed" + ); return -1; } @@ -432,7 +438,8 @@ static int mvcheck_if(struct state *state, struct ast *node, bool last) { if (!last) { semantic_error(node->scope, node, - "`if` statements must currently be exit points, sorry!"); + "`if` statements must currently be exit points, sorry!" + ); return -1; } @@ -518,7 +525,8 @@ static int mvcheck_nil_check(struct state *state, struct ast *node, bool last) if (!last) { /** @todo would this be an internal error? */ semantic_error(node->scope, node, - "`nil check` must be exit point, sorry"); + "`nil check` must be exit point, sorry" + ); return -1; } |
