authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-02-07 15:20:11+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-02-11 14:36:54+02:00
log8127a27eb11cec26203a8fa15afdee046d3ff507
tree317a7e49736eb6a2ee38be7ae0fe5ae00463215c
parent31ed8d293ddb79d34306e0b23e76d8a361c8856f

zig fmt: do not consider tuples blocks

Closes #14056

3 files changed, 5 insertions(+), 10 deletions(-)

lib/std/zig/render.zig-8
......@@ -2807,14 +2807,6 @@ fn nodeIsBlock(tag: Ast.Node.Tag) bool {
28072807 .block_semicolon,
28082808 .block_two,
28092809 .block_two_semicolon,
2810 .struct_init_dot,
2811 .struct_init_dot_comma,
2812 .struct_init_dot_two,
2813 .struct_init_dot_two_comma,
2814 .array_init_dot,
2815 .array_init_dot_comma,
2816 .array_init_dot_two,
2817 .array_init_dot_two_comma,
28182810 => true,
28192811 else => false,
28202812 };
src/AstGen.zig+2-1
......@@ -1730,7 +1730,8 @@ fn structInitExprRlNone(
17301730 .container_type = ty_inst,
17311731 .name_start = str_index,
17321732 }) } }
1733 else .{ .rl = .none };
1733 else
1734 .{ .rl = .none };
17341735 setExtra(astgen, extra_index, Zir.Inst.StructInitAnon.Item{
17351736 .field_name = str_index,
17361737 .init = try expr(gz, scope, sub_ri, field_init),
src/codegen/llvm.zig+3-1
......@@ -2273,7 +2273,9 @@ pub const Object = struct {
22732273
22742274 const full_di_fields: [2]*llvm.DIType =
22752275 if (layout.tag_align >= layout.payload_align)
2276 .{ tag_di, payload_di } else .{ payload_di, tag_di };
2276 .{ tag_di, payload_di }
2277 else
2278 .{ payload_di, tag_di };
22772279
22782280 const full_di_ty = dib.createStructType(
22792281 compile_unit_scope,