[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/test.c b/clang/test/CoverageMapping/test.c
index 8065598..ae73fcb 100644
--- a/clang/test/CoverageMapping/test.c
+++ b/clang/test/CoverageMapping/test.c
@@ -7,7 +7,7 @@
int main() { // CHECK-NEXT: File 0, [[@LINE]]:12 -> [[@LINE+7]]:2 = #0
// CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:24 = (#0 + #1)
for(int i = 0; i < 10; ++i) { // CHECK-NEXT: File 0, [[@LINE]]:26 -> [[@LINE]]:29 = #1
- bar(); // CHECK-NEXT: File 0, [[@LINE-1]]:31 -> [[@LINE+1]]:4 = #1
+ bar(); // CHECK: File 0, [[@LINE-1]]:31 -> [[@LINE+1]]:4 = #1
}
static_func();
return 0;