void expr_order_terms(expr *e);
/* Copy entire expression EXCEPT for index "except" at *top level only*. */
-/*@null@*/ expr *expr_copy_except(const expr *e, int except);
+expr *expr_copy_except(const expr *e, int except);
int expr_contains(expr *e, ExprType t);
/* allocate a new expression node, with children as defined.
* If it's a unary operator, put the element in left and set right=NULL. */
-/*@-usedef@*/
+/*@-compmempass@*/
expr *
expr_new(ExprOp op, ExprItem *left, ExprItem *right)
{
return ptr;
}
-/*@=usedef@*/
+/*@=compmempass@*/
/* helpers */
ExprItem *
expr *n;
int i;
- if (!e)
- return 0;
-
n = xmalloc(sizeof(expr)+sizeof(ExprItem)*(e->numterms<2?0:e->numterms-2));
n->op = e->op;
expr_new (EXPR_IDENT, (r), (ExprItem *)NULL)
/* allocates and makes an exact duplicate of e */
-/*@null@*/ expr *expr_copy(const expr *e);
+expr *expr_copy(const expr *e);
void expr_delete(/*@only@*/ /*@null@*/ expr *e);
void expr_order_terms(expr *e);
/* Copy entire expression EXCEPT for index "except" at *top level only*. */
-/*@null@*/ expr *expr_copy_except(const expr *e, int except);
+expr *expr_copy_except(const expr *e, int except);
int expr_contains(expr *e, ExprType t);
/* allocate a new expression node, with children as defined.
* If it's a unary operator, put the element in left and set right=NULL. */
-/*@-usedef@*/
+/*@-compmempass@*/
expr *
expr_new(ExprOp op, ExprItem *left, ExprItem *right)
{
return ptr;
}
-/*@=usedef@*/
+/*@=compmempass@*/
/* helpers */
ExprItem *
expr *n;
int i;
- if (!e)
- return 0;
-
n = xmalloc(sizeof(expr)+sizeof(ExprItem)*(e->numterms<2?0:e->numterms-2));
n->op = e->op;
expr_new (EXPR_IDENT, (r), (ExprItem *)NULL)
/* allocates and makes an exact duplicate of e */
-/*@null@*/ expr *expr_copy(const expr *e);
+expr *expr_copy(const expr *e);
void expr_delete(/*@only@*/ /*@null@*/ expr *e);