@@ -51,8 +51,8 @@ exprt::operandst build_function_environment(
51
51
52
52
for (const auto & p : parameters)
53
53
{
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 ( );
56
56
irep_idt identifier=id2string (goto_functionst::entry_point ())+
57
57
" ::" +id2string (base_name);
58
58
@@ -109,15 +109,12 @@ void record_function_outputs(
109
109
code_blockt &init_code,
110
110
symbol_tablet &symbol_table)
111
111
{
112
- // const code_typet::parameterst ¶meters=
113
- // to_code_type(function.type).parameters();
114
-
115
112
bool has_return_value=
116
113
to_code_type (function.type ).return_type ()!=empty_typet ();
117
114
118
115
if (has_return_value)
119
116
{
120
- // record return value
117
+ // record return value
121
118
codet output (ID_output);
122
119
output.operands ().resize (2 );
123
120
@@ -138,10 +135,12 @@ void record_function_outputs(
138
135
139
136
for(const auto & p : parameters)
140
137
{
138
+ if(p.get_identifier().empty())
139
+ continue;
140
+
141
141
irep_idt identifier=p.get_identifier();
142
- if(identifier.empty()) continue;
143
142
144
- const symbolt &symbol = symbol_table.lookup(identifier);
143
+ const symbolt &symbol= symbol_table.lookup(identifier);
145
144
146
145
if(symbol.type.id()==ID_pointer)
147
146
{
@@ -194,9 +193,11 @@ bool ansi_c_entry_point(
194
193
forall_symbol_base_map (it, symbol_table.symbol_base_map , config.main )
195
194
{
196
195
// 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 );
198
198
199
- if (s_it==symbol_table.symbols .end ()) continue ;
199
+ if (s_it==symbol_table.symbols .end ())
200
+ continue ;
200
201
201
202
if (s_it->second .type .id ()==ID_code)
202
203
matches.push_back (it->second );
@@ -456,7 +457,9 @@ bool ansi_c_entry_point(
456
457
const exprt &arg1=parameters[1 ];
457
458
458
459
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 ()));
460
463
461
464
// disable bounds check on that one
462
465
index_expr.set (" bounds_check" , false );
0 commit comments