File tree 3 files changed +12
-16
lines changed
3 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -251,10 +251,9 @@ code_ifthenelset java_bytecode_instrumentt::check_class_cast(
251
251
check_code=std::move (assert_class);
252
252
}
253
253
254
- code_ifthenelset conditional_check;
255
- notequal_exprt op_not_null (null_check_op, null_pointer_exprt (voidptr));
256
- conditional_check.cond ()=std::move (op_not_null);
257
- conditional_check.then_case ()=std::move (check_code);
254
+ const code_ifthenelset conditional_check (
255
+ notequal_exprt (std::move (null_check_op), null_pointer_exprt (voidptr)),
256
+ std::move (check_code));
258
257
return conditional_check;
259
258
}
260
259
Original file line number Diff line number Diff line change @@ -134,13 +134,6 @@ bool remove_instanceoft::lower_instanceof(
134
134
// possible values of T.
135
135
// (http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.20.2)
136
136
137
- code_ifthenelset is_null_branch;
138
- is_null_branch.cond () =
139
- equal_exprt (
140
- check_ptr, null_pointer_exprt (to_pointer_type (check_ptr.type ())));
141
- is_null_branch.then_case () =
142
- code_assignt (instanceof_result_sym.symbol_expr (), false_exprt ());
143
-
144
137
code_blockt else_block;
145
138
else_block.add (code_declt (clsid_tmp_sym.symbol_expr ()));
146
139
else_block.add (code_assignt (clsid_tmp_sym.symbol_expr (), object_clsid));
@@ -155,7 +148,11 @@ bool remove_instanceoft::lower_instanceof(
155
148
else_block.add (
156
149
code_assignt (instanceof_result_sym.symbol_expr (), disjunction (or_ops)));
157
150
158
- is_null_branch.else_case () = std::move (else_block);
151
+ const code_ifthenelset is_null_branch (
152
+ equal_exprt (
153
+ check_ptr, null_pointer_exprt (to_pointer_type (check_ptr.type ()))),
154
+ code_assignt (instanceof_result_sym.symbol_expr (), false_exprt ()),
155
+ std::move (else_block));
159
156
160
157
// Replace the instanceof construct with instanceof_result:
161
158
expr = instanceof_result_sym.symbol_expr ();
Original file line number Diff line number Diff line change @@ -174,10 +174,10 @@ void symbol_factoryt::gen_nondet_init(
174
174
auto set_null_inst=code_assignt (expr, null_pointer_exprt (pointer_type));
175
175
set_null_inst.add_source_location ()=loc;
176
176
177
- code_ifthenelset null_check;
178
- null_check. cond () = side_effect_expr_nondett (bool_typet (), loc);
179
- null_check. then_case ()= set_null_inst;
180
- null_check. else_case ()= non_null_inst;
177
+ code_ifthenelset null_check (
178
+ side_effect_expr_nondett (bool_typet (), loc),
179
+ std::move ( set_null_inst),
180
+ std::move ( non_null_inst)) ;
181
181
182
182
assignments.add (std::move (null_check));
183
183
}
You can’t perform that action at this time.
0 commit comments