[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-12-03 Thread Vedant Kumar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG859bf4d2bea2: [Coverage] Emit a gap region to cover switch bodies (authored by vsk). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D70571?vs=231724&id=231964#toc Repo

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-12-03 Thread Vedant Kumar via Phabricator via cfe-commits
vsk marked an inline comment as done. vsk added inline comments. Comment at: clang/docs/SourceBasedCodeCoverage.rst:330 +last case ends). This gap region has a zero count: this causes "gap" areas in +between case statements, which contain no executable code, to appear uncovered.

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-12-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. Looks fine to me. Comment at: clang/docs/SourceBasedCodeCoverage.rst:330 +last case ends). This gap region has a zero count: this causes "gap" areas in +between case statements,

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-12-02 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 231724. vsk added a comment. Add test case from PR44011. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70571/new/ https://reviews.llvm.org/D70571 Files: clang/docs/SourceBasedCodeCoverage.rst clang/lib/CodeGen/CoverageMappingGen.cpp clang/test/Co

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-11-24 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Thanks! I'm not that familiar with the coverage counters, but this seems good as far as I can tell. Maybe add the test case from PR44011? I didn't see any test cases with that kind of gaps between cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70571/new/ ht

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-11-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 230714. vsk added a comment. - Add some documentation about clang internals. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70571/new/ https://reviews.llvm.org/D70571 Files: clang/docs/SourceBasedCodeCoverage.rst clang/lib/CodeGen/CoverageMappingGen

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-11-21 Thread Vedant Kumar via Phabricator via cfe-commits
vsk planned changes to this revision. vsk marked an inline comment as done. vsk added a comment. I'll write something up in the coverage mapping docs. Briefly, though, with this change there should be a gap region that covers the entire switch body (starting from the '{' in 'switch {', and termi

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-11-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Could you write a description somewhere of what the overall region tree should look like for a switch? Comment at: clang/test/CoverageMapping/switch.cpp:32 switch (i) { // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+6]]:2 = #4 -nop();

[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

2019-11-21 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. vsk added reviewers: hans, rnk, efriedma. vsk edited the summary of this revision. Emit a gap region beginning where the switch body begins. This sets line execution counts in the areas between non-overlapping cases to 0. This does not resolve an outstanding issue with