File tree 3 files changed +6
-14
lines changed
3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -324,8 +324,7 @@ void goto_convertt::do_input(
324
324
const exprt::operandst &arguments,
325
325
goto_programt &dest)
326
326
{
327
- codet input_code;
328
- input_code.set_statement (ID_input);
327
+ codet input_code (ID_input);
329
328
input_code.operands ()=arguments;
330
329
input_code.add_source_location ()=function.source_location ();
331
330
@@ -344,8 +343,7 @@ void goto_convertt::do_output(
344
343
const exprt::operandst &arguments,
345
344
goto_programt &dest)
346
345
{
347
- codet output_code;
348
- output_code.set_statement (ID_output);
346
+ codet output_code (ID_output);
349
347
output_code.operands ()=arguments;
350
348
output_code.add_source_location ()=function.source_location ();
351
349
@@ -605,8 +603,7 @@ void goto_convertt::do_array_op(
605
603
throw 0 ;
606
604
}
607
605
608
- codet array_op_statement;
609
- array_op_statement.set_statement (id);
606
+ codet array_op_statement (id);
610
607
array_op_statement.operands ()=arguments;
611
608
array_op_statement.add_source_location ()=function.source_location ();
612
609
Original file line number Diff line number Diff line change @@ -425,8 +425,6 @@ void goto_convertt::remove_cpp_new(
425
425
goto_programt &dest,
426
426
bool result_is_used)
427
427
{
428
- codet call;
429
-
430
428
const symbolt &new_symbol = get_fresh_aux_symbol (
431
429
expr.type (),
432
430
tmp_symbol_prefix,
@@ -440,7 +438,7 @@ void goto_convertt::remove_cpp_new(
440
438
decl.add_source_location ()=new_symbol.location ;
441
439
convert_decl (decl, dest, ID_cpp);
442
440
443
- call= code_assignt (new_symbol.symbol_expr (), expr);
441
+ const code_assignt call (new_symbol.symbol_expr (), expr);
444
442
445
443
if (result_is_used)
446
444
static_cast <exprt &>(expr)=new_symbol.symbol_expr ();
@@ -456,9 +454,7 @@ void goto_convertt::remove_cpp_delete(
456
454
{
457
455
assert (expr.operands ().size ()==1 );
458
456
459
- codet tmp;
460
-
461
- tmp.set_statement (expr.get_statement ());
457
+ codet tmp (expr.get_statement ());
462
458
tmp.add_source_location ()=expr.source_location ();
463
459
tmp.copy_to_operands (expr.op0 ());
464
460
tmp.set (ID_destructor, expr.find (ID_destructor));
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ code_blockt &codet::make_block()
29
29
exprt tmp;
30
30
tmp.swap (*this );
31
31
32
- *this =codet ();
33
- set_statement (ID_block);
32
+ *this = codet (ID_block);
34
33
move_to_operands (tmp);
35
34
36
35
return static_cast <code_blockt &>(*this );
You can’t perform that action at this time.
0 commit comments