Improve termination rules checking for missing return; Make diverging procedure -> ! be terminators

This commit is contained in:
gingerBill
2020-06-06 15:16:24 +01:00
parent a3fa647bfd
commit 59a0bbb385
7 changed files with 90 additions and 44 deletions

View File

@@ -70,8 +70,8 @@ void check_entity_decl (CheckerContext *c, Entity *e, DeclInfo
void check_const_decl (CheckerContext *c, Entity *e, Ast *type_expr, Ast *init_expr, Type *named_type);
void check_proc_body (CheckerContext *c, Token token, DeclInfo *decl, Type *type, Ast *body);
void update_expr_type (CheckerContext *c, Ast *e, Type *type, bool final);
bool check_is_terminating (Ast *node);
bool check_has_break (Ast *stmt, bool implicit);
bool check_is_terminating (Ast *node, String const &label);
bool check_has_break (Ast *stmt, String const &label, bool implicit);
void check_stmt (CheckerContext *c, Ast *node, u32 flags);
void check_stmt_list (CheckerContext *c, Array<Ast *> const &stmts, u32 flags);
void check_init_constant (CheckerContext *c, Entity *e, Operand *operand);