| ... | ... | @@ -5192,9 +5192,10 @@ fn whileExpr( |
| 5192 | 5192 | try loop_scope.instructions.append(astgen.gpa, cond_block); |
| 5193 | 5193 | try continue_scope.setBlockBody(cond_block); |
| 5194 | 5194 | |
| 5195 | | // TODO avoid emitting the continue expr when there |
| 5195 | // This code could be improved to avoid emitting the continue expr when there |
| 5196 | 5196 | // are no jumps to it. This happens when the last statement of a while body is noreturn |
| 5197 | 5197 | // and there are no `continue` statements. |
| 5198 | // Tracking issue: https://github.com/ziglang/zig/issues/9185 |
| 5198 | 5199 | if (while_full.ast.cont_expr != 0) { |
| 5199 | 5200 | _ = try expr(&loop_scope, &loop_scope.base, .{ .ty = .void_type }, while_full.ast.cont_expr); |
| 5200 | 5201 | } |