aboutsummaryrefslogtreecommitdiff
path: root/src/move.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-05-01 14:40:06 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2026-05-01 14:40:06 +0300
commit7a68d1106b37e16c24e58bc77ce49fc6beadce9c (patch)
treeb0a3bb0b0124294b213cdfd3ae7b214bc32b19f5 /src/move.c
parent48cd04e1a57f076287fb6ecdd0a4236e191ff7d3 (diff)
downloadfwd-7a68d1106b37e16c24e58bc77ce49fc6beadce9c.tar.gz
fwd-7a68d1106b37e16c24e58bc77ce49fc6beadce9c.zip
run formatter
+ Should really get this done automatically somehow
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c22
1 files changed, 15 insertions, 7 deletions
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;
}