Skip to content

Make location coverage reported include all lines of a multi-line statement #5635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/goto-instrument/cover_basic_blocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ optionalt<std::size_t> cover_basic_blockst::continuation_of_block(
return {};
}

cover_basic_blockst::cover_basic_blockst(const goto_programt &_goto_program)
cover_basic_blockst::cover_basic_blockst(const goto_programt &goto_program)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

{
bool next_is_target = true;
std::size_t current_block = 0;

forall_goto_program_instructions(it, _goto_program)
forall_goto_program_instructions(it, goto_program)
{
// Is it a potential beginning of a block?
if(next_is_target || it->is_target())
Expand Down
2 changes: 1 addition & 1 deletion src/goto-instrument/cover_basic_blocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class cover_blocks_baset
class cover_basic_blockst final : public cover_blocks_baset
{
public:
explicit cover_basic_blockst(const goto_programt &_goto_program);
explicit cover_basic_blockst(const goto_programt &goto_program);

/// \param t: a goto instruction
/// \return the block number of the block
Expand Down