diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-01-20 13:34:47 +0000 |
|---|---|---|
| committer | Matthew Lugg <mlugg@mlugg.co.uk> | 2025-01-21 00:33:32 +0000 |
| commit | 8bcb578507908e17e2081bb03f8c51eb508d51db (patch) | |
| tree | 1e9caba23ae65432f8aa5abaa55f070e2b5220eb /src/Value.zig | |
| parent | b9198b708f8accb41fdb3f11bf635d63fbff461d (diff) | |
| download | zig-8bcb578507908e17e2081bb03f8c51eb508d51db.tar.gz zig-8bcb578507908e17e2081bb03f8c51eb508d51db.zip | |
Sema: fix `is_non_null_ptr` handling for runtime-known pointers
We can still often determine a comptime result based on the type, even
if the pointer is runtime-known.
Also, we previously used load -> is non null instead of AIR
`is_non_null_ptr` if the pointer is comptime-known, but that's a bad
heuristic. Instead, we should check for the pointer to be
comptime-known, *and* for the load to be comptime-known, and only in
that case should we call `Sema.analyzeIsNonNull`.
Resolves: #22556
Diffstat (limited to 'src/Value.zig')
0 files changed, 0 insertions, 0 deletions
