mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
Zcu: include named tests in resolved references
Oops, a little typo from yours truly! No test for this one, because we don't have any way of testing the reference trace.
This commit is contained in:
parent
63014d3819
commit
a7ff042f98
@ -3874,9 +3874,11 @@ fn resolveReferencesInner(zcu: *Zcu) !std.AutoHashMapUnmanaged(AnalUnit, ?Resolv
|
||||
.unnamed_test => true,
|
||||
.@"test", .decltest => a: {
|
||||
const fqn_slice = nav.fqn.toSlice(ip);
|
||||
if (comp.test_filters.len > 0) {
|
||||
for (comp.test_filters) |test_filter| {
|
||||
if (std.mem.indexOf(u8, fqn_slice, test_filter) != null) break;
|
||||
} else break :a false;
|
||||
}
|
||||
break :a true;
|
||||
},
|
||||
};
|
||||
@ -3886,9 +3888,12 @@ fn resolveReferencesInner(zcu: *Zcu) !std.AutoHashMapUnmanaged(AnalUnit, ?Resolv
|
||||
@intFromEnum(inst_info.inst),
|
||||
});
|
||||
try unit_queue.put(gpa, .wrap(.{ .nav_val = nav_id }), referencer);
|
||||
// Non-fatal AstGen errors could mean this test decl failed
|
||||
if (nav.status == .fully_resolved) {
|
||||
try unit_queue.put(gpa, .wrap(.{ .func = nav.status.fully_resolved.val }), referencer);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (zcu.namespacePtr(ns).pub_decls.keys()) |nav| {
|
||||
// These are named declarations. They are analyzed only if marked `export`.
|
||||
const inst_info = ip.getNav(nav).analysis.?.zir_index.resolveFull(ip) orelse continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user