aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-02-25 12:22:21 +0100
committerAndrew Kelley <andrew@ziglang.org>2020-02-25 17:36:54 -0500
commit89812217b4e5fee7e2851266c17c9d47204a1573 (patch)
tree0e6445544b7651d59640b1f9bdd95e09508f5f13 /src/analyze.cpp
parent416a547cdb8dbbf3d2e7ce32132f0a25f2a8607e (diff)
downloadzig-89812217b4e5fee7e2851266c17c9d47204a1573.tar.gz
zig-89812217b4e5fee7e2851266c17c9d47204a1573.zip
ir: Fix sizeOf comparison with ptr to zst
Closes #4536
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 95b2c77129..5ee5f44643 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -1132,10 +1132,9 @@ Error type_val_resolve_zero_bits(CodeGen *g, ZigValue *type_val, ZigType *parent
if (type_val->special != ConstValSpecialLazy) {
assert(type_val->special == ConstValSpecialStatic);
if ((type_val->data.x_type->id == ZigTypeIdStruct &&
- type_val->data.x_type->data.structure.resolve_loop_flag_zero_bits) ||
+ type_val->data.x_type->data.structure.resolve_loop_flag_zero_bits) ||
(type_val->data.x_type->id == ZigTypeIdUnion &&
- type_val->data.x_type->data.unionation.resolve_loop_flag_zero_bits) ||
- type_val->data.x_type->id == ZigTypeIdPointer)
+ type_val->data.x_type->data.unionation.resolve_loop_flag_zero_bits))
{
// Does a struct/union which contains a pointer field to itself have bits? Yes.
*is_zero_bits = false;