We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f034dbb + a235b44 commit 5d85d38Copy full SHA for 5d85d38
src/goto-programs/remove_returns.cpp
@@ -130,8 +130,8 @@ void remove_returnst::replace_returns(
130
131
// now turn the `return' into `assignment'
132
auto labels = std::move(instruction.labels);
133
- instruction = goto_programt::make_assignment(
134
- assignment, instruction.source_location());
+ instruction.clear(goto_program_instruction_typet::ASSIGN);
+ instruction.code_nonconst() = std::move(assignment);
135
instruction.labels = std::move(labels);
136
}
137
else
0 commit comments