Skip to content

Commit

Permalink
Merge pull request #8178 from tautschnig/bugfixes/remove-returns-loc-nr
Browse files Browse the repository at this point in the history
remove_returns: do not lose location numbers
  • Loading branch information
tautschnig authored Feb 2, 2024
2 parents f034dbb + a235b44 commit 5d85d38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/goto-programs/remove_returns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ void remove_returnst::replace_returns(

// now turn the `return' into `assignment'
auto labels = std::move(instruction.labels);
instruction = goto_programt::make_assignment(
assignment, instruction.source_location());
instruction.clear(goto_program_instruction_typet::ASSIGN);
instruction.code_nonconst() = std::move(assignment);
instruction.labels = std::move(labels);
}
else
Expand Down

0 comments on commit 5d85d38

Please sign in to comment.