File tree 3 files changed +12
-3
lines changed 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ void rw_range_sett::get_objects_array(
300
300
const range_spect &range_start,
301
301
const range_spect &size)
302
302
{
303
- const array_typet &array_type = to_array_type ( expr.type () );
303
+ const array_typet &array_type = expr.type ();
304
304
305
305
auto subtype_bits = pointer_offset_bits (array_type.subtype (), ns);
306
306
Original file line number Diff line number Diff line change @@ -122,8 +122,7 @@ optionalt<exprt> expr_initializert<nondet>::expr_initializer_rec(
122
122
// we initialize this with an empty array
123
123
124
124
array_exprt value ({}, array_type);
125
- value.type ().id (ID_array);
126
- value.type ().set (ID_size, from_integer (0 , size_type ()));
125
+ value.type ().size () = from_integer (0 , size_type ());
127
126
value.add_source_location ()=source_location;
128
127
return std::move (value);
129
128
}
Original file line number Diff line number Diff line change @@ -1681,6 +1681,16 @@ class array_exprt : public multi_ary_exprt
1681
1681
: multi_ary_exprt(ID_array, std::move(_operands), _type)
1682
1682
{
1683
1683
}
1684
+
1685
+ const array_typet &type () const
1686
+ {
1687
+ return static_cast <const array_typet &>(multi_ary_exprt::type ());
1688
+ }
1689
+
1690
+ array_typet &type ()
1691
+ {
1692
+ return static_cast <array_typet &>(multi_ary_exprt::type ());
1693
+ }
1684
1694
};
1685
1695
1686
1696
template <>
You can’t perform that action at this time.
0 commit comments