@@ -51,8 +51,8 @@ exprt::operandst build_function_environment(
5151
5252 for (const auto & p : parameters)
5353 {
54- irep_idt base_name=p.get_base_name ();
55- if (base_name. empty ()) base_name= " argument#" +i2string (i);
54+ irep_idt base_name=p.get_base_name (). empty ()?
55+ ( " argument#" +i2string (i)):p. get_base_name ( );
5656 irep_idt identifier=id2string (goto_functionst::entry_point ())+
5757 " ::" +id2string (base_name);
5858
@@ -109,15 +109,12 @@ void record_function_outputs(
109109 code_blockt &init_code,
110110 symbol_tablet &symbol_table)
111111{
112- // const code_typet::parameterst ¶meters=
113- // to_code_type(function.type).parameters();
114-
115112 bool has_return_value=
116113 to_code_type (function.type ).return_type ()!=empty_typet ();
117114
118115 if (has_return_value)
119116 {
120- // record return value
117+ // record return value
121118 codet output (ID_output);
122119 output.operands ().resize (2 );
123120
@@ -138,10 +135,12 @@ void record_function_outputs(
138135
139136 for(const auto & p : parameters)
140137 {
138+ if(p.get_identifier().empty())
139+ continue;
140+
141141 irep_idt identifier=p.get_identifier();
142- if(identifier.empty()) continue;
143142
144- const symbolt &symbol = symbol_table.lookup(identifier);
143+ const symbolt &symbol= symbol_table.lookup(identifier);
145144
146145 if(symbol.type.id()==ID_pointer)
147146 {
@@ -194,9 +193,11 @@ bool ansi_c_entry_point(
194193 forall_symbol_base_map (it, symbol_table.symbol_base_map , config.main )
195194 {
196195 // look it up
197- symbol_tablet::symbolst::const_iterator s_it=symbol_table.symbols .find (it->second );
196+ symbol_tablet::symbolst::const_iterator s_it=
197+ symbol_table.symbols .find (it->second );
198198
199- if (s_it==symbol_table.symbols .end ()) continue ;
199+ if (s_it==symbol_table.symbols .end ())
200+ continue ;
200201
201202 if (s_it->second .type .id ()==ID_code)
202203 matches.push_back (it->second );
@@ -456,7 +457,9 @@ bool ansi_c_entry_point(
456457 const exprt &arg1=parameters[1 ];
457458
458459 exprt index_expr (ID_index, arg1.type ().subtype ());
459- index_expr.copy_to_operands (argv_symbol.symbol_expr (), gen_zero (index_type ()));
460+ index_expr.copy_to_operands (
461+ argv_symbol.symbol_expr (),
462+ gen_zero (index_type ()));
460463
461464 // disable bounds check on that one
462465 index_expr.set (" bounds_check" , false );
0 commit comments