aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-01-06 17:17:27 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2026-01-06 17:19:52 +0200
commit99601456e6ad4c86287ba786923c99c5499037e0 (patch)
tree7f834f015cfc5c14e695e0521ae31c4262254dba /include
parent64146b46da45ce69ab380add00459f7b60fe9196 (diff)
downloadfwd-master.tar.gz
fwd-master.zip
improve move checker to detect pointer leaksHEADmastergnc
+ Currently requires a lot of unnecessary `forget` statements, but at least some can likely be eliminated by doing some basic origin analysis, kind of like with groups
Diffstat (limited to 'include')
-rw-r--r--include/fwd/ast.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/fwd/ast.h b/include/fwd/ast.h
index 4c8d412..0fd1118 100644
--- a/include/fwd/ast.h
+++ b/include/fwd/ast.h
@@ -349,7 +349,7 @@ static inline bool is_trivially_copyable(struct type *type)
case TYPE_U32:
case TYPE_U64:
case TYPE_REF:
- case TYPE_PTR:
+ case TYPE_BOOL:
case TYPE_FUNC_PTR:
case TYPE_PURE_CLOSURE:
return true;
@@ -590,6 +590,7 @@ static inline bool is_trivially_copyable(struct type *type)
#define nil_check_expr(x) return_a0(x, AST_NIL_CHECK)
#define nil_check_body(x) return_a1(x, AST_NIL_CHECK)
#define nil_check_ref(x) return_a2(x, AST_NIL_CHECK)
+#define nil_check_rest(x) return_a3(x, AST_NIL_CHECK)
#define gen_nil_check(expr, body, ref, loc) \
gen3(AST_NIL_CHECK, expr, body, ref, loc)