Skip to content

Commit 85e8337

Browse files
author
Daniel Kroening
committed
use mult_exprt/plus_exprt instead of binary_exprt
This is shorter and easier to read.
1 parent be5a2d5 commit 85e8337

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/util/simplify_expr_pointer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,11 @@ simplify_exprt::simplify_pointer_offset(const unary_exprt &expr)
376376

377377
exprt size_expr = from_integer(*element_size, expr.type());
378378

379-
exprt product = binary_exprt(sum, ID_mult, size_expr, expr.type());
379+
exprt product = mult_exprt(sum, size_expr);
380380

381381
product = simplify_node(product);
382382

383-
auto new_expr =
384-
binary_exprt(pointer_offset_expr, ID_plus, product, expr.type());
383+
auto new_expr = plus_exprt(pointer_offset_expr, product);
385384

386385
return changed(simplify_node(new_expr));
387386
}

0 commit comments

Comments
 (0)