@@ -1593,9 +1593,9 @@ void statement_list_typecheckt::typecheck_CPROVER_assert(
15931593 const codet &op_code,
15941594 symbolt &tia_element)
15951595{
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 ()) )
15991599 {
16001600 const code_assertt assertion{
16011601 typecheck_function_call_argument_rhs (tia_element, assignment->rhs ())};
@@ -1612,9 +1612,9 @@ void statement_list_typecheckt::typecheck_CPROVER_assume(
16121612 const codet &op_code,
16131613 symbolt &tia_element)
16141614{
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 ()) )
16181618 {
16191619 const code_assumet assumption{
16201620 typecheck_function_call_argument_rhs (tia_element, assignment->rhs ())};
@@ -1660,7 +1660,7 @@ void statement_list_typecheckt::typecheck_called_function(
16601660 const code_typet &called_type{to_code_type (called_function_sym.type )};
16611661
16621662 // 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 ()))
16641664 {
16651665 error () << " Function calls should not address instance data blocks" << eom;
16661666 throw TYPECHECK_ERROR;
@@ -1669,11 +1669,11 @@ void statement_list_typecheckt::typecheck_called_function(
16691669 // Check if function interface matches the call and fill argument list.
16701670 const code_typet::parameterst ¶ms{called_type.parameters ()};
16711671 code_function_callt::argumentst args;
1672- std::vector<equal_exprt > assignments;
1672+ std::vector<code_frontend_assignt > assignments;
16731673 for (const auto &expr : op_code.operands ())
16741674 {
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 );
16771677 }
16781678
16791679 for (const code_typet::parametert ¶m : params)
@@ -1706,13 +1706,13 @@ void statement_list_typecheckt::typecheck_called_function_block(
17061706}
17071707
17081708exprt statement_list_typecheckt::typecheck_function_call_arguments (
1709- const std::vector<equal_exprt > &assignments,
1709+ const std::vector<code_frontend_assignt > &assignments,
17101710 const code_typet::parametert ¶m,
17111711 const symbolt &tia_element)
17121712{
17131713 const irep_idt ¶m_name = param.get_base_name ();
17141714 const typet ¶m_type = param.type ();
1715- for (const equal_exprt &assignment : assignments)
1715+ for (const auto &assignment : assignments)
17161716 {
17171717 const symbol_exprt &lhs{to_symbol_expr (assignment.lhs ())};
17181718 if (param_name == lhs.get_identifier ())
@@ -1752,11 +1752,11 @@ exprt statement_list_typecheckt::typecheck_function_call_argument_rhs(
17521752}
17531753
17541754exprt statement_list_typecheckt::typecheck_return_value_assignment (
1755- const std::vector<equal_exprt > &assignments,
1755+ const std::vector<code_frontend_assignt > &assignments,
17561756 const typet &return_type,
17571757 const symbolt &tia_element)
17581758{
1759- for (const equal_exprt &assignment : assignments)
1759+ for (const auto &assignment : assignments)
17601760 {
17611761 const symbol_exprt &lhs{to_symbol_expr (assignment.lhs ())};
17621762 if (ID_statement_list_return_value_id == lhs.get_identifier ())
0 commit comments