summaryrefslogtreecommitdiffstats
path: root/clang/test/CoverageMapping/switchmacro.c
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-11-09 02:33:39 +0000
committerVedant Kumar <vsk@apple.com>2017-11-09 02:33:39 +0000
commit8046d22a36eeed2bf38d17006daf486acf520f7e (patch)
tree7f01bc7f5418254926c289b71a661a0ed324a8d9 /clang/test/CoverageMapping/switchmacro.c
parent2e8c87590546477736d6744edf8f5cf48bf1ef41 (diff)
downloadbcm5719-llvm-8046d22a36eeed2bf38d17006daf486acf520f7e.tar.gz
bcm5719-llvm-8046d22a36eeed2bf38d17006daf486acf520f7e.zip
[Coverage] Complete top-level deferred regions before labels
The area immediately after a terminated region in the function top-level should have the same count as the label it precedes. This solves another problem with wrapped segments. Consider: 1| a: 2| return 0; 3| b: 4| return 1; Without a gap area starting after the first return, the wrapped segment from line 2 would make it look like line 3 is executed, when it's not. rdar://35373009 llvm-svn: 317759
Diffstat (limited to 'clang/test/CoverageMapping/switchmacro.c')
-rw-r--r--clang/test/CoverageMapping/switchmacro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CoverageMapping/switchmacro.c b/clang/test/CoverageMapping/switchmacro.c
index 29f99af697d..f4c14f798f0 100644
--- a/clang/test/CoverageMapping/switchmacro.c
+++ b/clang/test/CoverageMapping/switchmacro.c
@@ -13,7 +13,7 @@ int foo(int i) { // CHECK-NEXT: File 0, [[@LINE]]:16 -> {{[0-9]+}}:2 = #0
// CHECK-NEXT: File 0, [[@LINE+1]]:8 -> {{[0-9]+}}:11 = (#2 - #3)
FOO(1);
case 0: // CHECK-NEXT: File 0, [[@LINE]]:3 -> [[@LINE+1]]:13 = ((#2 + #4) - #3)
- return 2;
+ return 2; // CHECK-NEXT: Gap,File 0, [[@LINE]]:13 -> [[@LINE+6]]:3 = #5
// CHECK-NEXT: Expansion,File 0, [[@LINE+2]]:3 -> [[@LINE+2]]:6 = 0
// CHECK-NEXT: File 0, [[@LINE+1]]:6 -> {{[0-9]+}}:11 = 0
OpenPOWER on IntegriCloud