aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-03-30 23:58:01 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-03-31 02:27:12 +0200
commite9b6fdfda4352452649618ee9482b6eae19b126a (patch)
tree85a9bf3cc87d8ee1dec7052ea150833438f15497 /evaluate.c
parent5aece3c39ccd92d7805f9b332a4253302d1d0ff6 (diff)
downloadsparse-e9b6fdfda4352452649618ee9482b6eae19b126a.tar.gz
constexpr: rename handle_simple_initializer() to handle_initializer()
This function, with a quite long name, not only handle simple initializer but also complex ones. So, rename it to the shorter and more correct form. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/evaluate.c b/evaluate.c
index 68a2d5eb..07edda41 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -2450,7 +2450,7 @@ static struct expression *next_designators(struct expression *old,
return new;
}
-static int handle_simple_initializer(struct expression **ep, int nested,
+static int handle_initializer(struct expression **ep, int nested,
int class, struct symbol *ctype);
/*
@@ -2515,7 +2515,7 @@ found:
else
v = &top->ident_expression;
- if (handle_simple_initializer(v, 1, lclass, top->ctype))
+ if (handle_initializer(v, 1, lclass, top->ctype))
continue;
if (!(lclass & TYPE_COMPOUND)) {
@@ -2607,7 +2607,7 @@ static struct expression *handle_scalar(struct expression *e, int nested)
* { "string", ...} - we need to preserve that string literal recognizable
* until we dig into the inner struct.
*/
-static int handle_simple_initializer(struct expression **ep, int nested,
+static int handle_initializer(struct expression **ep, int nested,
int class, struct symbol *ctype)
{
int is_string = is_string_type(ctype);
@@ -2696,7 +2696,7 @@ static void evaluate_initializer(struct symbol *ctype, struct expression **ep)
{
struct symbol *type;
int class = classify_type(ctype, &type);
- if (!handle_simple_initializer(ep, 0, class, ctype))
+ if (!handle_initializer(ep, 0, class, ctype))
expression_error(*ep, "invalid initializer");
}