This is an archive of the discontinued LLVM Phabricator instance.

[Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc
ClosedPublic

Authored by zequanwu on Aug 17 2020, 3:54 PM.

Details

Summary

Fix a bug if {Prev, Next}TokLoc is in different file from skipped regions' {start, end}Loc

Diff Detail

Event Timeline

zequanwu created this revision.Aug 17 2020, 3:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2020, 3:54 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
zequanwu requested review of this revision.Aug 17 2020, 3:54 PM
zequanwu updated this revision to Diff 286167.Aug 17 2020, 3:59 PM

Update test.
The bug is when start or end location skipped regions has the same spelling line number as PrevTokLoc or NextTokLoc but in different files.
In the test case, end location of skipped regions is in line 6 and PreTokLoc is also in line 6, but since they are in different files, it shouldn't be shrinked.

vsk accepted this revision.Aug 18 2020, 12:38 PM

Lgtm, thank you!

This revision is now accepted and ready to land.Aug 18 2020, 12:38 PM
zequanwu updated this revision to Diff 286387.Aug 18 2020, 1:25 PM

Minor fix on test case.

This revision was landed with ongoing or failed builds.Aug 18 2020, 1:26 PM
This revision was automatically updated to reflect the committed changes.