authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-06 02:04:27-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-06 02:04:27-05:00
logcf62f02ba99e45061f073f764d7d5a137ac35a67
treef90469379e47041bdcafa659393a11ea27c7529b
parent23feafdef0ff45e67ac63c7e220830c93b095e18

don't mark call instruction as generated

pass cast unreachable test

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

src/ir.cpp+1-1
...@@ -3970,7 +3970,7 @@ static IrInstruction *ir_gen_fn_call(IrBuilder *irb, Scope *scope, AstNode *node...@@ -3970,7 +3970,7 @@ static IrInstruction *ir_gen_fn_call(IrBuilder *irb, Scope *scope, AstNode *node
3970 }3970 }
39713971
3972 bool is_comptime = node->data.fn_call_expr.is_comptime;3972 bool is_comptime = node->data.fn_call_expr.is_comptime;
3973 return ir_mark_gen(ir_build_call(irb, scope, node, nullptr, fn_ref, arg_count, args, is_comptime));3973 return ir_build_call(irb, scope, node, nullptr, fn_ref, arg_count, args, is_comptime);
3974}3974}
39753975
3976static IrInstruction *ir_gen_if_bool_expr(IrBuilder *irb, Scope *scope, AstNode *node) {3976static IrInstruction *ir_gen_if_bool_expr(IrBuilder *irb, Scope *scope, AstNode *node) {
test/run_tests.cpp+1-1
...@@ -969,7 +969,7 @@ fn f() {...@@ -969,7 +969,7 @@ fn f() {
969fn f() -> i32 {969fn f() -> i32 {
970 i32(return 1)970 i32(return 1)
971}971}
972 )SOURCE", 1, ".tmp_source.zig:3:8: error: invalid cast from type 'unreachable' to 'i32'");972 )SOURCE", 1, ".tmp_source.zig:3:8: error: unreachable code");
973973
974 add_compile_fail_case("invalid builtin fn", R"SOURCE(974 add_compile_fail_case("invalid builtin fn", R"SOURCE(
975fn f() -> @bogus(foo) {975fn f() -> @bogus(foo) {