Skip to content

Commit

Permalink
inlined functions are no longer ignored when doing coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kroening committed Sep 16, 2017
1 parent 4cb72b3 commit ac022e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions regression/cbmc-cover/inlining1/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Discussion point: is the branch below one goal or two?

inline void my_func(int x)
{
if(x)
Expand Down
8 changes: 4 additions & 4 deletions regression/cbmc-cover/inlining1/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ main.c
--cover branch
^EXIT=0$
^SIGNAL=0$
^\[my_func.coverage.1\] file main.c line 3 function my_func block 1 branch false: SATISFIED$
^\[my_func.coverage.2\] file main.c line 3 function my_func block 1 branch true: FAILED$
^\[my_func.coverage.3\] file main.c line 3 function my_func block 2 branch false: FAILED$
^\[my_func.coverage.4\] file main.c line 3 function my_func block 2 branch true: SATISFIED$
^\[main.coverage.1\] file main.c line 13 function main entry point: SATISFIED$
^\[my_func.coverage.1\] file main.c line 5 function my_func entry point: SATISFIED$
^\[my_func.coverage.2\] file main.c line 5 function my_func block 1 branch false: SATISFIED$
^\[my_func.coverage.3\] file main.c line 5 function my_func block 1 branch true: SATISFIED$
--
^warning: ignoring
2 changes: 0 additions & 2 deletions src/cbmc/bmc_cover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ bool bmc_covert::operator()()
// This maps property IDs to 'goalt'
forall_goto_functions(f_it, goto_functions)
{
// Functions are already inlined.
if(f_it->second.is_inlined()) continue;
forall_goto_program_instructions(i_it, f_it->second.body)
{
if(i_it->is_assert())
Expand Down

0 comments on commit ac022e2

Please sign in to comment.