astgen: fix cppcheck warnings for err_scope_used and param_insts

Use memset initialization to satisfy cppcheck's data flow analysis:
- err_scope_used: cppcheck can't track writes through is_used_or_discarded pointer
- param_insts: cppcheck warns about potentially uninitialized array elements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 19:49:54 +00:00
parent 500bc6a791
commit d2c301cc95
4 changed files with 16 additions and 10 deletions

View File

@@ -7,7 +7,9 @@ const maxInt = std.math.maxInt;
const zig0 = if (@hasDecl(@import("root"), "zig0"))
@import("root").zig0
else
struct { pub const enabled = false; };
struct {
pub const enabled = false;
};
test "zig fmt: remove extra whitespace at start and end of file with comment between" {
try testTransform(