@@ -809,11 +809,13 @@ void string_refine_preprocesst::make_string_function_side_effect(
809
809
const irep_idt &function_name,
810
810
const std::string &signature)
811
811
{
812
+ // Cannot use const & here
812
813
code_function_callt function_call=to_code_function_call (target->code );
813
814
source_locationt loc=function_call.source_location ();
814
815
std::list<code_assignt> assignments;
815
- exprt lhs=function_call.lhs ();
816
- exprt s=function_call.arguments ()[0 ];
816
+ const exprt &lhs=function_call.lhs ();
817
+ assert (!function_call.arguments ().empty ());
818
+ const exprt &s=function_call.arguments ()[0 ];
817
819
code_typet function_type=to_code_type (function_call.type ());
818
820
819
821
function_type.return_type ()=s.type ();
@@ -901,7 +903,7 @@ void string_refine_preprocesst::make_to_char_array_function(
901
903
const code_function_callt &function_call=to_code_function_call (target->code );
902
904
source_locationt location=function_call.source_location ();
903
905
904
- assert (function_call.arguments ().size ()>= 1 );
906
+ assert (! function_call.arguments ().empty () );
905
907
const exprt &string_argument=function_call.arguments ()[0 ];
906
908
assert (is_java_string_pointer_type (string_argument.type ()));
907
909
@@ -985,7 +987,7 @@ exprt::operandst string_refine_preprocesst::process_arguments(
985
987
arg=typecast_exprt (arg, jls_ptr);
986
988
}
987
989
arg=make_cprover_string_assign (goto_program, target, arg, location);
988
- typet type=ns.follow (arg.type ());
990
+ const typet & type=ns.follow (arg.type ());
989
991
if (is_java_char_array_pointer_type (type))
990
992
{
991
993
arg=make_cprover_char_array_assign (goto_program, target, arg, location);
0 commit comments