Skip to content

Commit 24c9da7

Browse files
committed
Use plus_overflow_exprt in simplify_overflow_binary
1 parent 4e3e8b9 commit 24c9da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/simplify_expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,7 @@ simplify_exprt::simplify_overflow_binary(const binary_overflow_exprt &expr)
22242224
return unchanged(expr);
22252225

22262226
mp_integer no_overflow_result;
2227-
if(expr.id() == ID_overflow_plus)
2227+
if(can_cast_expr<plus_overflow_exprt>(expr))
22282228
no_overflow_result = *op0_value + *op1_value;
22292229
else if(can_cast_expr<minus_overflow_exprt>(expr))
22302230
no_overflow_result = *op0_value - *op1_value;

0 commit comments

Comments
 (0)