Skip to content

Commit ac022e2

Browse files
author
Daniel Kroening
committed
inlined functions are no longer ignored when doing coverage
1 parent 4cb72b3 commit ac022e2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

regression/cbmc-cover/inlining1/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Discussion point: is the branch below one goal or two?
2+
13
inline void my_func(int x)
24
{
35
if(x)

regression/cbmc-cover/inlining1/test.desc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ main.c
33
--cover branch
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[my_func.coverage.1\] file main.c line 3 function my_func block 1 branch false: SATISFIED$
7-
^\[my_func.coverage.2\] file main.c line 3 function my_func block 1 branch true: FAILED$
8-
^\[my_func.coverage.3\] file main.c line 3 function my_func block 2 branch false: FAILED$
9-
^\[my_func.coverage.4\] file main.c line 3 function my_func block 2 branch true: SATISFIED$
6+
^\[main.coverage.1\] file main.c line 13 function main entry point: SATISFIED$
7+
^\[my_func.coverage.1\] file main.c line 5 function my_func entry point: SATISFIED$
8+
^\[my_func.coverage.2\] file main.c line 5 function my_func block 1 branch false: SATISFIED$
9+
^\[my_func.coverage.3\] file main.c line 5 function my_func block 1 branch true: SATISFIED$
1010
--
1111
^warning: ignoring

src/cbmc/bmc_cover.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ bool bmc_covert::operator()()
204204
// This maps property IDs to 'goalt'
205205
forall_goto_functions(f_it, goto_functions)
206206
{
207-
// Functions are already inlined.
208-
if(f_it->second.is_inlined()) continue;
209207
forall_goto_program_instructions(i_it, f_it->second.body)
210208
{
211209
if(i_it->is_assert())

0 commit comments

Comments
 (0)