From 7a68d1106b37e16c24e58bc77ce49fc6beadce9c Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 1 May 2026 14:40:06 +0300 Subject: run formatter + Should really get this done automatically somehow --- src/move.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/move.c') diff --git a/src/move.c b/src/move.c index a76ffd5..44fbddd 100644 --- a/src/move.c +++ b/src/move.c @@ -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; } -- cgit v1.2.3