Skip to content

Commit 9090532

Browse files
committed
Removed dangling if-else statements.
1 parent 8af80a7 commit 9090532

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/goto-instrument/cover.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -708,17 +708,15 @@ bool eval_expr(
708708
no_op.make_not();
709709
return not eval_expr(atomic_exprs, no_op);
710710
}
711-
else if(is_condition(src))
711+
else //if(is_condition(src))
712712
{
713+
// ''src'' should be guaranteed to be consistent
714+
// with ''atomic_exprs''
713715
if(atomic_exprs.find(src)->second==+1)
714716
return true;
715-
else if(atomic_exprs.find(src)->second==-1)
717+
else //if(atomic_exprs.find(src)->second==-1)
716718
return false;
717719
}
718-
else
719-
{
720-
throw "Unexpected expr when evaluating a boolean expression";
721-
}
722720
}
723721

724722
/*******************************************************************\
@@ -1304,6 +1302,8 @@ void instrument_cover_goals(
13041302
//controlling=collect_mcdc_controlling(decisions);
13051303
controlling=collect_mcdc_controlling_nested(decisions);
13061304
remove_repetition(controlling);
1305+
// for now, we restrict to the case of a single ''decision'';
1306+
// however, this is not true, e.g., ''? :'' operator.
13071307
minimize_mcdc_controlling(controlling, *decisions.begin());
13081308

13091309
for(const auto & p : controlling)

0 commit comments

Comments
 (0)