mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Improve tracing of liveness error reporting.
This commit is contained in:
@@ -108,7 +108,8 @@ static void sema_trace_stmt_liveness(Ast *ast)
|
||||
case AST_CONTRACT:
|
||||
case AST_FOREACH_STMT:
|
||||
case AST_CONTRACT_FAULT:
|
||||
UNREACHABLE_VOID
|
||||
assert_print_line(ast->span);
|
||||
error_exit("Unexpected liveness checking of AST node %d.", ast->ast_kind);
|
||||
case AST_ASM_STMT:
|
||||
sema_trace_expr_list_liveness(ast->asm_stmt.args);
|
||||
return;
|
||||
@@ -269,7 +270,9 @@ RETRY:
|
||||
case EXPR_MEMBER_SET:
|
||||
case EXPR_NAMED_ARGUMENT:
|
||||
case UNRESOLVED_EXPRS:
|
||||
UNREACHABLE_VOID
|
||||
case EXPR_LAMBDA:
|
||||
assert_print_line(expr->span);
|
||||
error_exit("Unexpected liveness checking of expr node %d.", expr->expr_kind);
|
||||
case EXPR_TWO:
|
||||
sema_trace_expr_liveness(expr->two_expr.first);
|
||||
sema_trace_expr_liveness(expr->two_expr.last);
|
||||
@@ -412,8 +415,6 @@ RETRY:
|
||||
FOREACH(Expr *, e, expr->initializer_list) sema_trace_expr_liveness(e);
|
||||
return;
|
||||
}
|
||||
case EXPR_LAMBDA:
|
||||
UNREACHABLE_VOID
|
||||
case EXPR_MACRO_BLOCK:
|
||||
{
|
||||
FOREACH(Decl *, val, expr->macro_block.params) sema_trace_decl_liveness(val);
|
||||
@@ -638,7 +639,9 @@ RETRY:
|
||||
case DECL_MACRO:
|
||||
case DECL_GENERIC:
|
||||
case DECL_GENERIC_INSTANCE:
|
||||
UNREACHABLE_VOID
|
||||
case DECL_DECLARRAY:
|
||||
assert_print_line(decl->span);
|
||||
error_exit("Unexpected liveness checking of expr decl %d.", decl->decl_kind);
|
||||
case DECL_FNTYPE:
|
||||
sema_trace_func_liveness(&decl->fntype_decl.signature);
|
||||
return;
|
||||
@@ -671,7 +674,5 @@ RETRY:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case DECL_DECLARRAY:
|
||||
UNREACHABLE_VOID
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user