path: root/include
diff options
authorFlorian Westphal <>2019-02-08 17:02:19 +0100
committerFlorian Westphal <>2019-02-08 21:22:21 +0100
commit68e76238749fb238bf92e7dc8903fed15a86aa1b (patch)
tree9d968dd70b1c214ac28cd48b794699291a81ffc9 /include
parenta80997fa9a290462c5d001c5d448ddb2fbd7da5c (diff)
src: expr: add and use expr_name helper
Currently callers use expr->ops->name, but follouwp patch will remove the ops pointer from struct expr. So add this helper and use it everywhere. Signed-off-by: Florian Westphal <> Acked-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
1 files changed, 2 insertions, 0 deletions
diff --git a/include/expression.h b/include/expression.h
index f018c958..8a4cf5b1 100644
--- a/include/expression.h
+++ b/include/expression.h
@@ -406,6 +406,8 @@ extern struct expr *symbol_expr_alloc(const struct location *loc,
enum symbol_types type, struct scope *scope,
const char *identifier);
+const char *expr_name(const struct expr *e);
static inline void symbol_expr_set_type(struct expr *expr,
const struct datatype *dtype)