File tree 5 files changed +10
-15
lines changed 5 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ static void java_static_lifetime_init(
204
204
set_class_identifier (
205
205
to_struct_expr (*zero_object), ns, to_symbol_type (sym.type ));
206
206
207
- code_block.add (code_assignt (sym.symbol_expr (), *zero_object));
207
+ code_block.add (
208
+ std::move (code_assignt (sym.symbol_expr (), *zero_object)));
208
209
209
210
// Then call the init function:
210
211
code_block.add (std::move (initializer_call));
@@ -762,7 +763,7 @@ bool generate_java_start_function(
762
763
763
764
// Exceptional return: catch and assign to exc_symbol.
764
765
code_landingpadt landingpad (exc_symbol.symbol_expr ());
765
- init_code.add (toplevel_catch);
766
+ init_code.add (std::move ( toplevel_catch) );
766
767
init_code.add (std::move (landingpad));
767
768
768
769
// Converge normal and exceptional return:
Original file line number Diff line number Diff line change @@ -687,9 +687,8 @@ codet get_clinit_wrapper_body(
687
687
wrapper_body.cond () = check_already_run;
688
688
689
689
// add the "already-run = false" statement
690
- code_blockt init_body;
691
690
code_assignt set_already_run (already_run_symbol.symbol_expr (), true_exprt ());
692
- init_body. move ( set_already_run);
691
+ code_blockt init_body ({ set_already_run} );
693
692
694
693
clinit_wrapper_do_recursive_calls (
695
694
symbol_table,
Original file line number Diff line number Diff line change @@ -299,9 +299,9 @@ goto_programt::targett remove_java_newt::lower_java_new_array(
299
299
for_body.add (std::move (init_decl));
300
300
301
301
code_assignt init_subarray (init_sym, sub_java_new);
302
+ for_body.add (std::move (init_subarray));
302
303
code_assignt assign_subarray (
303
304
deref_expr, typecast_exprt (init_sym, deref_expr.type ()));
304
- for_body.move (init_subarray);
305
305
for_body.add (std::move (assign_subarray));
306
306
307
307
for_loop.init () = code_assignt (tmp_i, from_integer (0 , tmp_i.type ()));
Original file line number Diff line number Diff line change @@ -192,8 +192,7 @@ optionalt<codet> cpp_typecheckt::cpp_constructor(
192
192
side_effect_exprt assign (ID_assign, typet (), source_location);
193
193
assign.move_to_operands (member, val);
194
194
typecheck_side_effect_assignment (assign);
195
- code_expressiont code_exp (assign);
196
- block.move (code_exp);
195
+ block.add (std::move (code_expressiont (assign)));
197
196
}
198
197
199
198
// enter struct scope
Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ code_blockt generate_nondet_switch(
95
95
if (switch_cases.size () == 1 )
96
96
return code_blockt ({switch_cases[0 ]});
97
97
98
- code_switcht result_switch;
99
98
code_blockt result_block;
100
99
101
100
const symbol_exprt &switch_value = generate_nondet_int (
@@ -108,23 +107,20 @@ code_blockt generate_nondet_switch(
108
107
symbol_table,
109
108
result_block);
110
109
111
- result_switch.value () = switch_value;
112
-
113
110
code_blockt switch_block;
114
111
size_t case_number = 0 ;
115
112
for (const auto &switch_case : switch_cases)
116
113
{
117
114
code_blockt this_block;
118
115
this_block.add (switch_case);
119
116
this_block.add (code_breakt ());
120
- code_switch_caset this_case;
121
- this_case.case_op () = from_integer (case_number, switch_value.type ());
122
- this_case.code () = this_block;
123
- switch_block.move (this_case);
117
+ code_switch_caset this_case (
118
+ from_integer (case_number, switch_value.type ()), this_block);
119
+ switch_block.add (std::move (this_case));
124
120
++case_number;
125
121
}
126
122
127
- result_switch. body () = switch_block;
123
+ code_switcht result_switch (switch_value, switch_block) ;
128
124
result_block.add (std::move (result_switch));
129
125
return result_block;
130
126
}
You can’t perform that action at this time.
0 commit comments