1 // RUN: llvm-cov show %S/Inputs/deferred-regions.covmapping -instr-profile %S/Inputs/deferred-regions.profdata -show-line-counts-or-regions -dump -path-equivalence=/tmp,%S %s 2>%t.markers > %t.out && FileCheck %s -input-file %t.out && FileCheck %s -input-file %t.markers -check-prefix=MARKER
4 if (x
== 0) { // CHECK: [[@LINE]]|{{ +}}2|
5 return; // CHECK-NEXT: [[@LINE]]|{{ +}}1|
8 } // CHECK: [[@LINE]]|{{ +}}1|
13 } // CHECK: [[@LINE]]|{{ +}}1|
17 return; // CHECK: [[@LINE]]|{{ +}}0|
19 for (int i
= 0; i
< 10; ++i
) { // CHECK: [[@LINE]]|{{ +}}2|
20 if (i
% 2 == 0) // CHECK: [[@LINE]]|{{ +}}2|
21 continue; // CHECK: [[@LINE]]|{{ +}}1|
23 if (i
% 5 == 0) // CHECK: [[@LINE]]|{{ +}}1|
24 break; // CHECK: [[@LINE]]|{{ +}}0|
27 return; // CHECK: [[@LINE]]|{{ +}}1|
29 } // CHECK: [[@LINE]]|{{ +}}1|
36 return; // CHECK: [[@LINE]]|{{ +}}0|
39 while (++x
< 10) { // CHECK: [[@LINE]]|{{ +}}3|
40 if (x
== 1) // CHECK: [[@LINE]]|{{ +}}2|
41 continue; // CHECK: [[@LINE]]|{{ +}}1|
43 while (++x
< 4) { // CHECK: [[@LINE]]|{{ +}}1|
44 if (x
== 3) // CHECK: [[@LINE]]|{{ +}}1|
45 break; // CHECK: [[@LINE]]|{{ +}}1|
46 // CHECK: [[@LINE]]|{{ +}}0|
47 while (++x
< 5) {} // CHECK: [[@LINE]]|{{ +}}0|
48 } // CHECK: [[@LINE]]|{{ +}}0|
50 if (x
== 0) // CHECK: [[@LINE]]|{{ +}}1|
51 throw Error(); // CHECK: [[@LINE]]|{{ +}}0|
52 // CHECK: [[@LINE]]|{{ +}}1|
53 while (++x
< 9) { // CHECK: [[@LINE]]|{{ +}}6|
54 if (x
== 0) // CHECK: [[@LINE]]|{{ +}}5|
55 break; // CHECK: [[@LINE]]|{{ +}}0|
62 if (false) // CHECK: [[@LINE]]|{{ +}}1|
63 goto out
; // CHECK: [[@LINE]]|{{ +}}0|
64 // CHECK: [[@LINE]]|{{ +}}1|
65 return; // CHECK: [[@LINE]]|{{ +}}1|
67 out
: // CHECK: [[@LINE]]|{{ +}}0|
71 void if_else(bool flag
) {
72 if (flag
) { // CHECK: [[@LINE]]|{{ +}}2|
73 return; // CHECK: [[@LINE]]|{{ +}}1|
74 } else { // CHECK: [[@LINE]]|{{ +}}1|
75 return; // CHECK: [[@LINE]]|{{ +}}1|
76 } // CHECK: [[@LINE]]|{{ +}}1|
91 // MARKER: Highlighted line 17, 5 -> 11
92 // MARKER-NEXT: Marker at 19:3 = 1
93 // MARKER-NEXT: Marker at 19:27 = 1
94 // MARKER-NEXT: Highlighted line 24, 7 -> 12
95 // MARKER-NEXT: Highlighted line 36, 5 -> 11
96 // MARKER-NEXT: Highlighted line 47, 7 -> 14
97 // MARKER-NEXT: Highlighted line 47, 14 -> 21
98 // MARKER-NEXT: Highlighted line 47, 21 -> 23
99 // MARKER-NEXT: Highlighted line 47, 23 -> 25
100 // MARKER-NEXT: Highlighted line 47, 25 -> ?
101 // MARKER-NEXT: Highlighted line 48, 1 -> 6
102 // MARKER-NEXT: Highlighted line 51, 7 -> 20
103 // MARKER-NEXT: Marker at 53:5 = 1
104 // MARKER-NEXT: Highlighted line 55, 9 -> 14
105 // MARKER-NEXT: Highlighted line 63, 5 -> 13
106 // MARKER-NEXT: Highlighted line 67, 1 -> ?
107 // MARKER-NEXT: Highlighted line 68, 1 -> 8