[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 15:06:39 PST 2019
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(); // CHECK-NEXT: File 0, [[@LINE]]:5 -> [[@LINE+2]]:10 = 0
+ nop(); // CHECK-NEXT: Gap,File 0, [[@LINE-1]]:14 -> [[@LINE+2]]:10 = 0
case 1: // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+1]]:10 = #7
----------------
I'm not sure I understand the effect here. Will we show that nop() never executes, or will we not show any coverage information for it?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70571/new/
https://reviews.llvm.org/D70571
More information about the cfe-commits
mailing list