aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-28 12:06:46 +0000
committergingerBill <bill@gingerbill.org>2023-01-28 12:09:24 +0000
commitc45ca1bfcccb9b8f001a62a52c56eeeb5c73be88 (patch)
treec4c79f9da168c82039df23c22fcdacebb3698ad0 /src/check_expr.cpp
parent94edf89b20d7bef9b9afef82a2d306657e3ace26 (diff)
Correct `arena_temp_end` usage when no allocation ever happens for that arena
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index b4b36a950..df293e955 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -2375,7 +2375,7 @@ gb_internal void check_comparison(CheckerContext *c, Operand *x, Operand *y, Tok
return;
}
-
+ TEMPORARY_ALLOCATOR_GUARD();
gbString err_str = nullptr;
if (check_is_assignable_to(c, x, y->type) ||
@@ -2405,7 +2405,6 @@ gb_internal void check_comparison(CheckerContext *c, Operand *x, Operand *y, Tok
if (x->type == err_type && is_operand_nil(*x)) {
err_type = y->type;
}
- TEMPORARY_ALLOCATOR_GUARD();
gbString type_string = type_to_string(err_type, temporary_allocator());
err_str = gb_string_make(temporary_allocator(),
gb_bprintf("operator '%.*s' not defined for type '%s'", LIT(token_strings[op]), type_string));
@@ -2418,7 +2417,6 @@ gb_internal void check_comparison(CheckerContext *c, Operand *x, Operand *y, Tok
add_comparison_procedures_for_fields(c, comparison_type);
}
} else {
- TEMPORARY_ALLOCATOR_GUARD();
gbString xt, yt;
if (x->mode == Addressing_ProcGroup) {
xt = gb_string_make(temporary_allocator(), "procedure group");