Skip to content

Commit 7bbef4a

Browse files
authored
Merge pull request #4371 from diffblue/array_of_exprt_API
array_of_exprt API
2 parents d5cf916 + 728a231 commit 7bbef4a

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/solvers/flattening/boolbv_array_of.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bvt boolbvt::convert_array_of(const array_of_exprt &expr)
1818
DATA_INVARIANT(
1919
expr.type().id() == ID_array, "array_of expression shall have array type");
2020

21-
const array_typet &array_type=to_array_type(expr.type());
21+
const array_typet &array_type = expr.type();
2222

2323
if(is_unbounded_array(array_type))
2424
return conversion_failed(expr);

src/util/std_expr.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,14 +1585,19 @@ inline index_exprt &to_index_expr(exprt &expr)
15851585
class array_of_exprt:public unary_exprt
15861586
{
15871587
public:
1588-
DEPRECATED(SINCE(2018, 9, 21, "use array_of_exprt(what, type) instead"))
1589-
array_of_exprt():unary_exprt(ID_array_of)
1588+
explicit array_of_exprt(exprt _what, array_typet _type)
1589+
: unary_exprt(ID_array_of, std::move(_what), std::move(_type))
15901590
{
15911591
}
15921592

1593-
explicit array_of_exprt(exprt _what, array_typet _type)
1594-
: unary_exprt(ID_array_of, std::move(_what), std::move(_type))
1593+
const array_typet &type() const
1594+
{
1595+
return static_cast<const array_typet &>(unary_exprt::type());
1596+
}
1597+
1598+
array_typet &type()
15951599
{
1600+
return static_cast<array_typet &>(unary_exprt::type());
15961601
}
15971602

15981603
exprt &what()

0 commit comments

Comments
 (0)