aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-03-14 03:37:54 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-03-14 03:37:54 -0400
commitefebb6d341306d508163e7bb5ded41f4bc0468d4 (patch)
treecd1dc6143a6dea7fcb35e35487803d21840d097a /src/ir.cpp
parentc828c23f71055fc4614ada20a20fb1c7bfee50c6 (diff)
downloadzig-efebb6d341306d508163e7bb5ded41f4bc0468d4.tar.gz
zig-efebb6d341306d508163e7bb5ded41f4bc0468d4.zip
fix tests broken by previous commit
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 51a538db59..db9a2b24c3 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -15222,7 +15222,7 @@ static TypeTableEntry *ir_analyze_instruction_offset_of(IrAnalyze *ira,
return ira->codegen->builtin_types.entry_invalid;
}
- if (field->type_entry->zero_bits) {
+ if (!type_has_bits(field->type_entry)) {
ir_add_error(ira, field_name_value,
buf_sprintf("zero-bit field '%s' in struct '%s' has no offset",
buf_ptr(field_name), buf_ptr(&container_type->name)));