You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Coverage] Fix handling of return statements within repeat-while loops
In 2a34b7c, we introduced an incorrect test case for return statements
within repeat-while loops. Consider this situation:
repeat { // Region 1
return
} while C1 // Should be "zero", not "Region 1"
The fix requires maintaining a stack of active repeat-while loops. This
is an accepted idiom (c.f the clang CoverageMapping implementation). To
see why a stack is needed, consider:
repeat { // Region 1
repeat { // Region 2
if (C1) { // Region 3
return
}
} while C2 // Should be "Region 2 - *Region 3*", not "Region 2"
} while C3 // Should be "Region 1 - *Region 3*", not "Region 1"
rdar://problem/24572268
0 commit comments