projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
35c0046
)
The typeof-type is always set, no need to check and use the expression's type as...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 10 Sep 2011 10:16:32 +0000
(12:16 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 10 Sep 2011 10:16:32 +0000
(12:16 +0200)
type.c
patch
|
blob
|
history
diff --git
a/type.c
b/type.c
index
b7a5b6d
..
46cb071
100644
(file)
--- a/
type.c
+++ b/
type.c
@@
-1213,11
+1213,7
@@
unsigned get_type_size(type_t *type)
case TYPE_TYPEDEF:
return get_type_size(type->typedeft.typedefe->type);
case TYPE_TYPEOF:
case TYPE_TYPEDEF:
return get_type_size(type->typedeft.typedefe->type);
case TYPE_TYPEOF:
- if (type->typeoft.typeof_type) {
- return get_type_size(type->typeoft.typeof_type);
- } else {
- return get_type_size(type->typeoft.expression->base.type);
- }
+ return get_type_size(type->typeoft.typeof_type);
}
panic("invalid type in get_type_size");
}
}
panic("invalid type in get_type_size");
}
@@
-1255,11
+1251,7
@@
unsigned get_type_alignment(type_t *type)
return alignment;
}
case TYPE_TYPEOF:
return alignment;
}
case TYPE_TYPEOF:
- if (type->typeoft.typeof_type) {
- return get_type_alignment(type->typeoft.typeof_type);
- } else {
- return get_type_alignment(type->typeoft.expression->base.type);
- }
+ return get_type_alignment(type->typeoft.typeof_type);
}
panic("invalid type in get_type_alignment");
}
}
panic("invalid type in get_type_alignment");
}
@@
-1301,11
+1293,7
@@
decl_modifiers_t get_type_modifiers(const type_t *type)
return modifiers;
}
case TYPE_TYPEOF:
return modifiers;
}
case TYPE_TYPEOF:
- if (type->typeoft.typeof_type) {
- return get_type_modifiers(type->typeoft.typeof_type);
- } else {
- return get_type_modifiers(type->typeoft.expression->base.type);
- }
+ return get_type_modifiers(type->typeoft.typeof_type);
}
panic("invalid type found in get_type_modifiers");
}
}
panic("invalid type found in get_type_modifiers");
}