authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2024-09-08 21:27:35-07:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-09-09 10:05:42+01:00
log9e6d167bb7878682e99482bfaef12e45376665f9
treebb6355f6e1e86948d3909f4e20949c8e1c27bda8
parent54b668f8a33e8466e4771e12f50069a068244640

comp: `populateTestFunctions` shouldn't bubble up `AnalysisFail`

`ensureCauAnalyzed` adds the anal_unit to the transitive failures, so we don't need to do anything here. The errors will be handled after this function.

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

src/Zcu/PerThread.zig+5-2
......@@ -2429,7 +2429,7 @@ fn processExportsInner(
24292429pub fn populateTestFunctions(
24302430 pt: Zcu.PerThread,
24312431 main_progress_node: std.Progress.Node,
2432) !void {
2432) Allocator.Error!void {
24332433 const zcu = pt.zcu;
24342434 const gpa = zcu.gpa;
24352435 const ip = &zcu.intern_pool;
......@@ -2454,7 +2454,10 @@ pub fn populateTestFunctions(
24542454 zcu.sema_prog_node = std.Progress.Node.none;
24552455 }
24562456 const cau_index = ip.getNav(nav_index).analysis_owner.unwrap().?;
2457 try pt.ensureCauAnalyzed(cau_index);
2457 pt.ensureCauAnalyzed(cau_index) catch |err| switch (err) {
2458 error.AnalysisFail => return,
2459 error.OutOfMemory => return error.OutOfMemory,
2460 };
24582461 }
24592462
24602463 const test_fns_val = zcu.navValue(nav_index);