authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2022-10-01 03:51:36-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2022-10-01 04:02:00-04:00
logd9490a4340366818f91fac428981fe662d552ca6
tree930bb6fee4ccf3a74cc4eb61cfb179562313b080
parent34835bbbcfe81cc87e823d14dc9b25e698ad5edc

Sema: avoid undefined fields in file struct decls

Fixes original comment of #12399

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

src/Module.zig+2
...@@ -4430,6 +4430,8 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void {...@@ -4430,6 +4430,8 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void {
4430 new_decl.has_linksection_or_addrspace = false;4430 new_decl.has_linksection_or_addrspace = false;
4431 new_decl.ty = ty_ty;4431 new_decl.ty = ty_ty;
4432 new_decl.val = struct_val;4432 new_decl.val = struct_val;
4433 new_decl.@"align" = 0;
4434 new_decl.@"linksection" = null;
4433 new_decl.has_tv = true;4435 new_decl.has_tv = true;
4434 new_decl.owns_tv = true;4436 new_decl.owns_tv = true;
4435 new_decl.alive = true; // This Decl corresponds to a File and is therefore always alive.4437 new_decl.alive = true; // This Decl corresponds to a File and is therefore always alive.