summaryrefslogtreecommitdiff
path: root/clang/test/CoverageMapping/moremacros.c
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-11-09 02:33:38 +0000
committerVedant Kumar <vsk@apple.com>2017-11-09 02:33:38 +0000
commit2cc14cbae540e7af6eafa75df91e5e7108ca3a68 (patch)
tree4a56b6664e59365b893b533a242f84cc81306032 /clang/test/CoverageMapping/moremacros.c
parent200d5ab1048d723d1ea5e5587eb78e6efb2e60e3 (diff)
[Coverage] Emit a gap area after if conditions
The area immediately after the closing right-paren of an if condition should have a count equal to the 'then' block's count. Use a gap region to set this count, so that region highlighting for the 'then' block remains precise. This solves a problem we have with wrapped segments. Consider: 1| if (false) 2| foo(); Without a gap area starting after the condition, the wrapped segment from line 1 would make it look like line 2 is executed, when it's not. rdar://35373009
Diffstat (limited to 'clang/test/CoverageMapping/moremacros.c')
-rw-r--r--clang/test/CoverageMapping/moremacros.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CoverageMapping/moremacros.c b/clang/test/CoverageMapping/moremacros.c
index 630b75d855e..88411f3ba91 100644
--- a/clang/test/CoverageMapping/moremacros.c
+++ b/clang/test/CoverageMapping/moremacros.c
@@ -7,7 +7,7 @@
// CHECK-NEXT: File 0, [[@LINE+1]]:40 -> {{[0-9]+}}:2 = #0
int main(int argc, const char *argv[]) {
// CHECK-NEXT: File 0, [[@LINE+1]]:7 -> [[@LINE+1]]:12 = #0
- if (!argc) {} // CHECK-NEXT: File 0, [[@LINE]]:14 -> [[@LINE]]:16 = #1
+ if (!argc) {} // CHECK: File 0, [[@LINE]]:14 -> [[@LINE]]:16 = #1
// CHECK-NEXT: File 0, [[@LINE+3]]:7 -> [[@LINE+3]]:12 = #0
// CHECK-NEXT: Expansion,File 0, [[@LINE+2]]:14 -> [[@LINE+2]]:19 = #2
@@ -27,7 +27,7 @@ int main(int argc, const char *argv[]) {
// CHECK-NEXT: File 0, [[@LINE+3]]:3 -> [[@LINE+7]]:2 = ((#0 - #2) - #3)
// CHECK-NEXT: File 0, [[@LINE+2]]:7 -> [[@LINE+2]]:12 = ((#0 - #2) - #3)
- // CHECK-NEXT: File 0, [[@LINE+1]]:14 -> [[@LINE+4]]:8 = #4
+ // CHECK: File 0, [[@LINE+1]]:14 -> [[@LINE+4]]:8 = #4
if (!argc) {
return 0;
// CHECK-NEXT: Expansion,File 0, [[@LINE+1]]:3 -> [[@LINE+1]]:8 = #4