Skip to content

Commit

Permalink
AstGen: convert a TODO comment to an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Jun 21, 2021
1 parent a30b3e2 commit 432d121
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AstGen.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5192,9 +5192,10 @@ fn whileExpr(
try loop_scope.instructions.append(astgen.gpa, cond_block);
try continue_scope.setBlockBody(cond_block);

// TODO avoid emitting the continue expr when there
// This code could be improved to avoid emitting the continue expr when there
// are no jumps to it. This happens when the last statement of a while body is noreturn
// and there are no `continue` statements.
// Tracking issue: https://github.com/ziglang/zig/issues/9185
if (while_full.ast.cont_expr != 0) {
_ = try expr(&loop_scope, &loop_scope.base, .{ .ty = .void_type }, while_full.ast.cont_expr);
}
Expand Down

0 comments on commit 432d121

Please sign in to comment.