authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-20 20:55:33-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-21 17:03:03-07:00
logf4a9e0530a065f637f1a7fba95b163597bd88410
treef41b59c02b88f7d0d17e78576d94fdc35dc08ac1
parent9fffffb07b081858db0c2102a0680aa166b48263

AstGen: convert a TODO comment to an issue

See #363

1 files changed, 2 insertions(+), 1 deletions(-)

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