[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
Loading
Please sign in to comment