authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-08-02 17:48:15+02:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-08-02 17:49:36+02:00
log447a4cc115f5d105d49fcb3e970082b89e5a46dd
tree45fae965683e5638efa0bd2bf2d22ad173769b6e
parentc5afefec427f2f2aeb25fe8f7114b5a0a6aa1129

autodoc: fix off-by-1 error in analysis of pointer types


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

src/Autodoc.zig+2-2
......@@ -1399,7 +1399,6 @@ fn walkInstruction(
13991399 const extra = file.zir.extraData(Zir.Inst.PtrType, ptr.payload_index);
14001400 var extra_index = extra.end;
14011401
1402 const type_slot_index = self.types.items.len;
14031402 const elem_type_ref = try self.walkRef(
14041403 file,
14051404 parent_scope,
......@@ -1446,6 +1445,7 @@ fn walkInstruction(
14461445 host_size = ref_result.expr;
14471446 }
14481447
1448 const type_slot_index = self.types.items.len;
14491449 try self.types.append(self.arena, .{
14501450 .Pointer = .{
14511451 .size = ptr.size,
......@@ -2994,7 +2994,7 @@ fn tryResolveRefPath(
29942994 "TODO: handle `{s}`in tryResolveRefPath\nInfo: {}",
29952995 .{ @tagName(resolved_parent), resolved_parent },
29962996 );
2997 path[i + 1] = (try self.cteTodo("match failure")).expr;
2997 path[i + 1] = (try self.cteTodo("<match failure>")).expr;
29982998 continue :outer;
29992999 },
30003000 .comptimeExpr, .call, .typeOf => {