Skip to content
Commit 94dd4766 authored by Ying Yi's avatar Ying Yi
Browse files

[Coverage] Fix an issue: a statement after calling 'assert()' function is wrongly

marked as 'not executed'.

In the current coverage mapping implementation, we terminate the current region
and start a zero region when we hit a nonreturn function. However, for logical OR,
the second operand is not executed if the first operand evaluates to true. If the
nonreturn function is called in the right side of logical OR and the left side of
logical OR is TRUE, we should not start a zero `GapRegionCounter`. This will also
apply to `VisitAbstractConditionalOperator`.

Fixes https://github.com/llvm/llvm-project/issues/59030

Reviewed By: zequanwu

Differential Revision: https://reviews.llvm.org/D144371
parent d94e8479
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment