projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd07a24
)
Remove unnecessary special case: sizeof expressions always have their type set, there...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 2 May 2009 10:28:09 +0000
(10:28 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 2 May 2009 10:28:09 +0000
(10:28 +0000)
[r25860]
ast.c
patch
|
blob
|
history
diff --git
a/ast.c
b/ast.c
index
fbc22d6
..
47a8ace
100644
(file)
--- a/
ast.c
+++ b/
ast.c
@@
-1851,14
+1851,8
@@
bool is_constant_expression(const expression_t *expression)
return true;
case EXPR_SIZEOF: {
- type_t *type = expression->typeprop.type;
- if (type == NULL)
- type = expression->typeprop.tp_expression->base.type;
-
- type = skip_typeref(type);
- if (is_type_array(type) && type->array.is_vla)
- return false;
- return true;
+ type_t *const type = skip_typeref(expression->typeprop.type);
+ return !is_type_array(type) || !type->array.is_vla;
}
case EXPR_STRING_LITERAL: