From 395efb9c8a0a0160a7b95769e9484bae5548bbde Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 17 Aug 2024 20:47:33 +0300 Subject: add analyzer and fix some reported issues --- src/lower.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lower.c') diff --git a/src/lower.c b/src/lower.c index a01dd40..4093cbf 100644 --- a/src/lower.c +++ b/src/lower.c @@ -279,13 +279,14 @@ static int lower_param(struct lower_state *s, struct ast *p, struct vec *fixups) assert(p->k == AST_VAR_DEF); assert(var_init(p) == NULL); - if (is_primitive(p->t) || p->t->k == TYPE_PTR || p->t->k == TYPE_CALLABLE) { + if (is_primitive(p->t) || p->t->k == TYPE_PTR || + p->t->k == TYPE_CALLABLE) { return lower_simple_param(s, p); } if (p->t->k != TYPE_STRUCT) { semantic_error(p->scope->fctx, p, - "illegal type"); + "illegal type"); return -1; } -- cgit v1.3