diff options
| author | gingerBill <bill@gingerbill.org> | 2022-11-13 22:55:32 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-11-13 22:55:32 +0000 |
| commit | a705a2e38bee035d6800999ba6eddd82792594f7 (patch) | |
| tree | 9beece2552d41ad12489e7cfaf73df80bbf6fb95 /src/check_stmt.cpp | |
| parent | 7dfbda58d9c51932fa91a04727b821860358289d (diff) | |
Minor improvement to multi return value reducing stack usage
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 9cacb4a35..8271ca451 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -2014,6 +2014,10 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) { if (is_ast_decl(ds->stmt)) { error(ds->token, "You cannot defer a declaration"); } else { + if (ctx->decl != nullptr) { + ctx->decl->defer_use_count += 1; + } + bool out_in_defer = ctx->in_defer; ctx->in_defer = true; check_stmt(ctx, ds->stmt, 0); |