Print this page
12166 resync smatch to 0.6.1-rc1-il-3

@@ -83,10 +83,12 @@
         return preop;
 }
 
 struct expression *deref_expression(struct expression *expr)
 {
+        if (expr->type == EXPR_BINOP)
+                expr = preop_expression(expr, '(');
         return preop_expression(expr, '*');
 }
 
 struct expression *assign_expression(struct expression *left, int op, struct expression *right)
 {

@@ -160,10 +162,21 @@
         ret->string = string;
 
         return ret;
 }
 
+struct expression *call_expression(struct expression *fn, struct expression_list *args)
+{
+        struct expression *expr;
+
+        expr = alloc_tmp_expression(fn->pos, EXPR_CALL);
+        expr->fn = fn;
+        expr->args = args;
+
+        return expr;
+}
+
 static struct expression *get_expression_from_base_and_str(struct expression *base, const char *addition)
 {
         struct expression *ret = NULL;
         struct token *token, *prev, *end;
         char *alloc;