symbol_t *iter_symbol = iter->base.symbol;
if (iter_symbol == NULL) {
type_t *type = iter->declaration.type;
- if (type->kind != TYPE_COMPOUND_STRUCT
- && type->kind != TYPE_COMPOUND_UNION)
+ if (!is_type_compound(type))
continue;
compound_t *sub_compound = type->compound.compound;
type_left = type;
}
- if (type_left->kind != TYPE_COMPOUND_STRUCT &&
- type_left->kind != TYPE_COMPOUND_UNION) {
-
+ if (!is_type_compound(type_left)) {
if (is_type_valid(type_left) && !saw_error) {
errorf(&pos,
"request for member '%Y' in something not a struct or union, but '%T'",
continue;
type_t *type = entity->typedefe.type;
- if(type->kind == TYPE_COMPOUND_STRUCT
- || type->kind == TYPE_COMPOUND_UNION) {
+ if (is_type_compound(type)) {
write_compound(entity->base.symbol, &type->compound);
} else if(type->kind == TYPE_ENUM) {
write_enum(entity->base.symbol, &type->enumt);
}
#if 0
- if(type->kind == TYPE_COMPOUND_STRUCT
- || type->kind == TYPE_COMPOUND_UNION) {
+ if (is_type_compound(type)) {
write_compound(entity->base.symbol, &type->compound);
}
#endif