diff options
| author | gingerBill <bill@gingerbill.org> | 2023-08-01 11:03:15 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-08-01 11:03:15 +0100 |
| commit | c35c58b023ec98aa7d42498b9ece68cf481f2c32 (patch) | |
| tree | 9c1c31294ea9c8bc1e2cb584282dbba78f29eabf /src/check_expr.cpp | |
| parent | 4b57aec1c6b926dedd77054b82b05a29c152a099 (diff) | |
Add `-vet-style` and `-vet-semicolon`
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index f9c62b506..8d159d920 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2261,7 +2261,7 @@ gb_internal bool check_is_not_addressable(CheckerContext *c, Operand *o) { } gb_internal void check_old_for_or_switch_value_usage(Ast *expr) { - if (!build_context.strict_style) { + if (!(build_context.strict_style || (check_vet_flags(expr) & VetFlag_Style))) { return; } @@ -2351,7 +2351,7 @@ gb_internal void check_unary_expr(CheckerContext *c, Operand *o, Token op, Ast * o->type = alloc_type_pointer(o->type); } } else { - if (build_context.strict_style && ast_node_expect(node, Ast_UnaryExpr)) { + if (ast_node_expect(node, Ast_UnaryExpr)) { ast_node(ue, UnaryExpr, node); check_old_for_or_switch_value_usage(ue->expr); } |