summaryrefslogtreecommitdiff
path: root/clang/test/CoverageMapping/if.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2021-02-17 18:16:40 -0800
committerZequan Wu <zequanwu@google.com>2021-02-18 11:41:04 -0800
commitd83511dd26ca8d0dd5be6302ad7b55de05cedab2 (patch)
tree88ab39ce9975487287d5a018f3d01320807f6148 /clang/test/CoverageMapping/if.cpp
parent9fa11201618d8ad3a978815d90d3e64d8e0fa310 (diff)
[Coverage] Emit gap region after conditions when macro is present.
Diffstat (limited to 'clang/test/CoverageMapping/if.cpp')
-rw-r--r--clang/test/CoverageMapping/if.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/test/CoverageMapping/if.cpp b/clang/test/CoverageMapping/if.cpp
index 3c3a76a8c46a..5b705cd46ab7 100644
--- a/clang/test/CoverageMapping/if.cpp
+++ b/clang/test/CoverageMapping/if.cpp
@@ -6,7 +6,7 @@ int nop() { return 0; }
// CHECK-NEXT: [[@LINE+3]]:12 -> [[@LINE+8]]:2 = #0
// CHECK-NEXT: [[@LINE+3]]:15 -> [[@LINE+3]]:19 = #0
// CHECK-NEXT: Branch,File 0, [[@LINE+2]]:15 -> [[@LINE+2]]:19 = 0, 0
-void foo() { // CHECK-NEXT: Gap,File 0, [[@LINE+1]]:20 -> [[@LINE+1]]:22 = #2
+void foo() { // CHECK-NEXT: Gap,File 0, [[@LINE+1]]:21 -> [[@LINE+1]]:22 = #2
if (int j = true ? nop() // CHECK-NEXT: [[@LINE]]:22 -> [[@LINE]]:27 = #2
: nop(); // CHECK-NEXT: [[@LINE]]:22 -> [[@LINE]]:27 = (#0 - #2)
j) // CHECK-NEXT: [[@LINE]]:7 -> [[@LINE]]:8 = #0
@@ -41,13 +41,12 @@ int main() { // CHECK: File 0, [[@LINE]]:12 -> {{[0-9]+}}:2 =
// CHECK-NEXT: File 0, [[@LINE+2]]:7 -> [[@LINE+2]]:13 = #0
// CHECK-NEXT: Branch,File 0, [[@LINE+1]]:7 -> [[@LINE+1]]:13 = #5, (#0 - #5)
- i = i == 0? // CHECK-NEXT: Gap,File 0, [[@LINE]]:13 -> [[@LINE+1]]:9 = #5
+ i = i == 0? // CHECK-NEXT: Gap,File 0, [[@LINE]]:14 -> [[@LINE+1]]:9 = #5
i + 1 : // CHECK-NEXT: File 0, [[@LINE]]:9 -> [[@LINE]]:14 = #5
i + 2; // CHECK-NEXT: File 0, [[@LINE]]:9 -> [[@LINE]]:14 = (#0 - #5)
- // CHECK-NEXT: File 0, [[@LINE+4]]:7 -> [[@LINE+4]]:13 = #0
- // CHECK-NEXT: Branch,File 0, [[@LINE+3]]:7 -> [[@LINE+3]]:13 = #6, (#0 - #6)
- // CHECK-NEXT: Gap,File 0, [[@LINE+2]]:13 -> [[@LINE+2]]:14 = #6
+ // CHECK-NEXT: File 0, [[@LINE+3]]:7 -> [[@LINE+3]]:13 = #0
+ // CHECK-NEXT: Branch,File 0, [[@LINE+2]]:7 -> [[@LINE+2]]:13 = #6, (#0 - #6)
// CHECK-NEXT: File 0, [[@LINE+1]]:14 -> [[@LINE+1]]:20 = #6
i = i == 0?i + 12:i + 10; // CHECK-NEXT: File 0, [[@LINE]]:21 -> [[@LINE]]:27 = (#0 - #6)