aboutsummaryrefslogtreecommitdiff
path: root/src/Zcu.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-02-05 21:58:32 +0000
committermlugg <mlugg@mlugg.co.uk>2025-02-05 22:00:55 +0000
commitb21becb2a6a82b4ac65e98fa0094a7786cbbfdc3 (patch)
tree3f34547059ff6e207e17ccf64d0ce68cf0728220 /src/Zcu.zig
parent3031d813874f6d6ad9ae4b793e3af6cdf632fa66 (diff)
downloadzig-b21becb2a6a82b4ac65e98fa0094a7786cbbfdc3.tar.gz
zig-b21becb2a6a82b4ac65e98fa0094a7786cbbfdc3.zip
incremental: fix crash when introducing syntax error
Clearing the analysis roots was very clever and all, but not actually valid. We need to avoid *any* reference to the analysis errors if there were any fatal files, and that includes sorting the errors! Resolves: #22774
Diffstat (limited to 'src/Zcu.zig')
-rw-r--r--src/Zcu.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Zcu.zig b/src/Zcu.zig
index 9b292ad783..c870a04adf 100644
--- a/src/Zcu.zig
+++ b/src/Zcu.zig
@@ -181,6 +181,8 @@ analysis_roots: std.BoundedArray(*Package.Module, 3) = .{},
/// Allocated into `gpa`.
resolved_references: ?std.AutoHashMapUnmanaged(AnalUnit, ?ResolvedReference) = null,
+skip_analysis_errors: bool = false,
+
stage1_flags: packed struct {
have_winmain: bool = false,
have_wwinmain: bool = false,