Add #+escape-analysis and #+no-escape-analysis file tags, and keep the syntactic check of unsafe returns where the escape analysis is disabled

This commit is contained in:
gingerBill committed 2026-10-07 21:06:56 +01:00
1 parent 6784db9f86
commit d728de8a20
7 files changed
+166 -7

No files matched your search

+1 -1
View File
@@ -9562,7 +9562,7 @@ gb_internal ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *c
c->decl->defer_used += 1;
}
}
if (c->curr_proc_decl != nullptr && !build_context.no_escape_analysis) {
if (c->curr_proc_decl != nullptr && escape_analysis_in_use()) {
per_thread_array_add(&c->info->checked_calls_queue, CheckedCall{c->curr_proc_decl, callee});
}
}