commit 447a4cc115f5d105d49fcb3e970082b89e5a46dd (tree)
parent c5afefec427f2f2aeb25fe8f7114b5a0a6aa1129
Author: Loris Cro <kappaloris@gmail.com>
Date: Tue, 2 Aug 2022 17:48:15 +0200
autodoc: fix off-by-1 error in analysis of pointer types
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Autodoc.zig b/src/Autodoc.zig
@@ -1399,7 +1399,6 @@ fn walkInstruction(
const extra = file.zir.extraData(Zir.Inst.PtrType, ptr.payload_index);
var extra_index = extra.end;
- const type_slot_index = self.types.items.len;
const elem_type_ref = try self.walkRef(
file,
parent_scope,
@@ -1446,6 +1445,7 @@ fn walkInstruction(
host_size = ref_result.expr;
}
+ const type_slot_index = self.types.items.len;
try self.types.append(self.arena, .{
.Pointer = .{
.size = ptr.size,
@@ -2994,7 +2994,7 @@ fn tryResolveRefPath(
"TODO: handle `{s}`in tryResolveRefPath\nInfo: {}",
.{ @tagName(resolved_parent), resolved_parent },
);
- path[i + 1] = (try self.cteTodo("match failure")).expr;
+ path[i + 1] = (try self.cteTodo("<match failure>")).expr;
continue :outer;
},
.comptimeExpr, .call, .typeOf => {