@@ -1593,9 +1593,9 @@ void statement_list_typecheckt::typecheck_CPROVER_assert(
1593
1593
const codet &op_code,
1594
1594
symbolt &tia_element)
1595
1595
{
1596
- const equal_exprt * const assignment =
1597
- expr_try_dynamic_cast<equal_exprt>(op_code. op1 ());
1598
- if (assignment )
1596
+ if (
1597
+ const auto assignment =
1598
+ expr_try_dynamic_cast<code_frontend_assignt>(op_code. op1 ()) )
1599
1599
{
1600
1600
const code_assertt assertion{
1601
1601
typecheck_function_call_argument_rhs (tia_element, assignment->rhs ())};
@@ -1612,9 +1612,9 @@ void statement_list_typecheckt::typecheck_CPROVER_assume(
1612
1612
const codet &op_code,
1613
1613
symbolt &tia_element)
1614
1614
{
1615
- const equal_exprt * const assignment =
1616
- expr_try_dynamic_cast<equal_exprt>(op_code. op1 ());
1617
- if (assignment )
1615
+ if (
1616
+ const auto assignment =
1617
+ expr_try_dynamic_cast<code_frontend_assignt>(op_code. op1 ()) )
1618
1618
{
1619
1619
const code_assumet assumption{
1620
1620
typecheck_function_call_argument_rhs (tia_element, assignment->rhs ())};
@@ -1660,7 +1660,7 @@ void statement_list_typecheckt::typecheck_called_function(
1660
1660
const code_typet &called_type{to_code_type (called_function_sym.type )};
1661
1661
1662
1662
// Check if function name is followed by data block.
1663
- if (!can_cast_expr<equal_exprt >(op_code.op1 ()))
1663
+ if (!can_cast_expr<code_frontend_assignt >(op_code.op1 ()))
1664
1664
{
1665
1665
error () << " Function calls should not address instance data blocks" << eom;
1666
1666
throw TYPECHECK_ERROR;
@@ -1669,11 +1669,11 @@ void statement_list_typecheckt::typecheck_called_function(
1669
1669
// Check if function interface matches the call and fill argument list.
1670
1670
const code_typet::parameterst ¶ms{called_type.parameters ()};
1671
1671
code_function_callt::argumentst args;
1672
- std::vector<equal_exprt > assignments;
1672
+ std::vector<code_frontend_assignt > assignments;
1673
1673
for (const auto &expr : op_code.operands ())
1674
1674
{
1675
- if (can_cast_expr<equal_exprt >(expr))
1676
- assignments.push_back (to_equal_expr (expr) );
1675
+ if (auto assign = expr_try_dynamic_cast<code_frontend_assignt >(expr))
1676
+ assignments.push_back (*assign );
1677
1677
}
1678
1678
1679
1679
for (const code_typet::parametert ¶m : params)
@@ -1706,13 +1706,13 @@ void statement_list_typecheckt::typecheck_called_function_block(
1706
1706
}
1707
1707
1708
1708
exprt statement_list_typecheckt::typecheck_function_call_arguments (
1709
- const std::vector<equal_exprt > &assignments,
1709
+ const std::vector<code_frontend_assignt > &assignments,
1710
1710
const code_typet::parametert ¶m,
1711
1711
const symbolt &tia_element)
1712
1712
{
1713
1713
const irep_idt ¶m_name = param.get_base_name ();
1714
1714
const typet ¶m_type = param.type ();
1715
- for (const equal_exprt &assignment : assignments)
1715
+ for (const auto &assignment : assignments)
1716
1716
{
1717
1717
const symbol_exprt &lhs{to_symbol_expr (assignment.lhs ())};
1718
1718
if (param_name == lhs.get_identifier ())
@@ -1752,11 +1752,11 @@ exprt statement_list_typecheckt::typecheck_function_call_argument_rhs(
1752
1752
}
1753
1753
1754
1754
exprt statement_list_typecheckt::typecheck_return_value_assignment (
1755
- const std::vector<equal_exprt > &assignments,
1755
+ const std::vector<code_frontend_assignt > &assignments,
1756
1756
const typet &return_type,
1757
1757
const symbolt &tia_element)
1758
1758
{
1759
- for (const equal_exprt &assignment : assignments)
1759
+ for (const auto &assignment : assignments)
1760
1760
{
1761
1761
const symbol_exprt &lhs{to_symbol_expr (assignment.lhs ())};
1762
1762
if (ID_statement_list_return_value_id == lhs.get_identifier ())
0 commit comments