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(...@@ -2429,7 +2429,7 @@ fn processExportsInner(
2429pub fn populateTestFunctions(2429pub fn populateTestFunctions(
2430 pt: Zcu.PerThread,2430 pt: Zcu.PerThread,
2431 main_progress_node: std.Progress.Node,2431 main_progress_node: std.Progress.Node,
2432) !void {2432) Allocator.Error!void {
2433 const zcu = pt.zcu;2433 const zcu = pt.zcu;
2434 const gpa = zcu.gpa;2434 const gpa = zcu.gpa;
2435 const ip = &zcu.intern_pool;2435 const ip = &zcu.intern_pool;
...@@ -2454,7 +2454,10 @@ pub fn populateTestFunctions(...@@ -2454,7 +2454,10 @@ pub fn populateTestFunctions(
2454 zcu.sema_prog_node = std.Progress.Node.none;2454 zcu.sema_prog_node = std.Progress.Node.none;
2455 }2455 }
2456 const cau_index = ip.getNav(nav_index).analysis_owner.unwrap().?;2456 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 };
2458 }2461 }
24592462
2460 const test_fns_val = zcu.navValue(nav_index);2463 const test_fns_val = zcu.navValue(nav_index);