@@ -90,11 +90,11 @@ process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns)
90
90
auto array_size = size_of_expr (expr.type (), ns);
91
91
CHECK_RETURN (array_size.has_value ());
92
92
if (do_simplify)
93
- simplify (array_size. value () , ns);
93
+ simplify (* array_size, ns);
94
94
expr = make_byte_extract (
95
95
expr,
96
96
from_integer (0 , c_index_type ()),
97
- array_typet (char_type (), array_size. value () ));
97
+ array_typet (char_type (), * array_size));
98
98
}
99
99
100
100
// given an array type T[N], i.e., an array of N elements of type T, and a
@@ -109,7 +109,7 @@ process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns)
109
109
auto subtype_size_opt = size_of_expr (subtype, ns);
110
110
CHECK_RETURN (subtype_size_opt.has_value ());
111
111
exprt subtype_size = typecast_exprt::conditional_cast (
112
- subtype_size_opt. value () , array_size_type);
112
+ * subtype_size_opt, array_size_type);
113
113
new_offset = div_exprt (new_offset, subtype_size);
114
114
minus_exprt subtraction{prev_array_type.size (), new_offset};
115
115
if_exprt new_size{
0 commit comments