@@ -191,14 +191,14 @@ void local_safe_pointerst::output(
191191 const goto_programt &goto_program,
192192 const namespacet &ns)
193193{
194- forall_goto_program_instructions (i_it, goto_program)
194+ for ( const auto &instruction : goto_program. instructions )
195195 {
196- out << " **** " << i_it-> location_number << " "
197- << i_it-> source_location << " \n " ;
196+ out << " **** " << instruction. location_number << " "
197+ << instruction. source_location << " \n " ;
198198
199199 out << " Non-null expressions: " ;
200200
201- auto findit = non_null_expressions.find (i_it-> location_number );
201+ auto findit = non_null_expressions.find (instruction. location_number );
202202 if (findit == non_null_expressions.end ())
203203 out << " {}" ;
204204 else
@@ -216,7 +216,7 @@ void local_safe_pointerst::output(
216216 }
217217
218218 out << ' \n ' ;
219- goto_program.output_instruction (ns, irep_idt (), out, *i_it );
219+ goto_program.output_instruction (ns, irep_idt (), out, instruction );
220220 out << ' \n ' ;
221221 }
222222}
@@ -235,21 +235,21 @@ void local_safe_pointerst::output_safe_dereferences(
235235 const goto_programt &goto_program,
236236 const namespacet &ns)
237237{
238- forall_goto_program_instructions (i_it, goto_program)
238+ for ( const auto &instruction : goto_program. instructions )
239239 {
240- out << " **** " << i_it-> location_number << " "
241- << i_it-> source_location << " \n " ;
240+ out << " **** " << instruction. location_number << " "
241+ << instruction. source_location << " \n " ;
242242
243243 out << " Safe (known-not-null) dereferences: " ;
244244
245- auto findit = non_null_expressions.find (i_it-> location_number );
245+ auto findit = non_null_expressions.find (instruction. location_number );
246246 if (findit == non_null_expressions.end ())
247247 out << " {}" ;
248248 else
249249 {
250250 out << " {" ;
251251 bool first = true ;
252- i_it-> apply ([&first, &out](const exprt &e) {
252+ instruction. apply ([&first, &out](const exprt &e) {
253253 for (auto subexpr_it = e.depth_begin (), subexpr_end = e.depth_end ();
254254 subexpr_it != subexpr_end;
255255 ++subexpr_it)
@@ -267,7 +267,7 @@ void local_safe_pointerst::output_safe_dereferences(
267267 }
268268
269269 out << ' \n ' ;
270- goto_program.output_instruction (ns, irep_idt (), out, *i_it );
270+ goto_program.output_instruction (ns, irep_idt (), out, instruction );
271271 out << ' \n ' ;
272272 }
273273}
0 commit comments