[Coverage] Emit gap areas in braces-optional statements (PR35387)
Emit a gap area starting after the r-paren location and ending at the
start of the body for the braces-optional statements (for, for-each,
while, etc). The count for the gap area equal to the body's count. This
extends the fix in r317758.
Fixes PR35387, rdar://35570345
Testing: stage2 coverage-enabled build of clang, check-clang
llvm-svn: 319373
diff --git a/clang/test/CoverageMapping/objc.m b/clang/test/CoverageMapping/objc.m
index ab361d7..4e4c184 100644
--- a/clang/test/CoverageMapping/objc.m
+++ b/clang/test/CoverageMapping/objc.m
@@ -17,7 +17,7 @@
// CHECK: func2
void func2(NSArray *array) { // CHECK-NEXT: File 0, [[@LINE]]:28 -> {{[0-9]+}}:2 = #0
- int i = 0;
+ int i = 0; // CHECK-NEXT: Gap,File 0, [[@LINE+1]]:28 -> [[@LINE+1]]:29 = #1
for (NSArray *x in array) { // CHECK-NEXT: File 0, [[@LINE]]:29 -> [[@LINE+7]]:4 = #1
// CHECK-NEXT: File 0, [[@LINE+1]]:9 -> [[@LINE+1]]:10 = #1
if (x) { // CHECK: File 0, [[@LINE]]:12 -> [[@LINE+2]]:6 = #2