diff options
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp index becb4cf06..abe66c7f7 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -881,6 +881,10 @@ bool is_type_empty_union(Type *t) { t = base_type(t); return t->kind == Type_Union && t->Union.variants.count == 0; } +bool is_type_empty_struct(Type *t) { + t = base_type(t); + return t->kind == Type_Struct && !t->Struct.is_raw_union && t->Struct.fields.count == 0; +} bool is_type_valid_for_keys(Type *t) { |