xref: /minix3/external/bsd/llvm/dist/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG %s > %t 2>&1
2f4a2713aSLionel Sambuc // RUN: FileCheck --input-file=%t %s
3f4a2713aSLionel Sambuc 
4f4a2713aSLionel Sambuc class A {
5f4a2713aSLionel Sambuc public:
6f4a2713aSLionel Sambuc // CHECK:      [B1 (ENTRY)]
7f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
8f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
9f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
A()10f4a2713aSLionel Sambuc   A() {}
11f4a2713aSLionel Sambuc 
12f4a2713aSLionel Sambuc // CHECK:      [B1 (ENTRY)]
13f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
14f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
15f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
~A()16f4a2713aSLionel Sambuc   ~A() {}
17f4a2713aSLionel Sambuc 
18f4a2713aSLionel Sambuc // CHECK:      [B2 (ENTRY)]
19f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
20f4a2713aSLionel Sambuc // CHECK:      [B1]
21f4a2713aSLionel Sambuc // CHECK-NEXT:   1: 1
22f4a2713aSLionel Sambuc // CHECK-NEXT:   2: return [B1.1];
23f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B2
24f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
25f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
26f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
operator int() const27f4a2713aSLionel Sambuc   operator int() const { return 1; }
28f4a2713aSLionel Sambuc };
29f4a2713aSLionel Sambuc 
30f4a2713aSLionel Sambuc extern const bool UV;
31f4a2713aSLionel Sambuc 
32f4a2713aSLionel Sambuc // CHECK:      [B2 (ENTRY)]
33f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
34f4a2713aSLionel Sambuc // CHECK:      [B1]
35f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
36f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
37f4a2713aSLionel Sambuc // CHECK-NEXT:   3: a
38f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B1.3] (ImplicitCastExpr, NoOp, const class A)
39f4a2713aSLionel Sambuc // CHECK-NEXT:   5: const A &b = a;
40f4a2713aSLionel Sambuc // CHECK-NEXT:   6: A() (CXXConstructExpr, class A)
41f4a2713aSLionel Sambuc // CHECK-NEXT:   7: [B1.6] (BindTemporary)
42f4a2713aSLionel Sambuc // CHECK-NEXT:   8: [B1.7] (ImplicitCastExpr, NoOp, const class A)
43f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B1.8]
44f4a2713aSLionel Sambuc // CHECK:       10: const A &c = A();
45f4a2713aSLionel Sambuc // CHECK:       11: [B1.10].~A() (Implicit destructor)
46f4a2713aSLionel Sambuc // CHECK:       12: [B1.2].~A() (Implicit destructor)
47f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B2
48f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
49f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
50f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_const_ref()51f4a2713aSLionel Sambuc void test_const_ref() {
52f4a2713aSLionel Sambuc   A a;
53f4a2713aSLionel Sambuc   const A& b = a;
54f4a2713aSLionel Sambuc   const A& c = A();
55f4a2713aSLionel Sambuc }
56f4a2713aSLionel Sambuc 
57f4a2713aSLionel Sambuc // CHECK:      [B2 (ENTRY)]
58f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
59f4a2713aSLionel Sambuc // CHECK:      [B1]
60f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A [2])
61f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a[2];
62f4a2713aSLionel Sambuc // CHECK-NEXT:   3:  (CXXConstructExpr, class A [0])
63f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A b[0];
64f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B1.2].~A() (Implicit destructor)
65f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B2
66f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
67f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
68f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_array()69f4a2713aSLionel Sambuc void test_array() {
70f4a2713aSLionel Sambuc   A a[2];
71f4a2713aSLionel Sambuc   A b[0];
72f4a2713aSLionel Sambuc }
73f4a2713aSLionel Sambuc 
74f4a2713aSLionel Sambuc // CHECK:      [B2 (ENTRY)]
75f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
76f4a2713aSLionel Sambuc // CHECK:      [B1]
77f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
78f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
79f4a2713aSLionel Sambuc // CHECK-NEXT:   3:  (CXXConstructExpr, class A)
80f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A c;
81f4a2713aSLionel Sambuc // CHECK-NEXT:   5:  (CXXConstructExpr, class A)
82f4a2713aSLionel Sambuc // CHECK-NEXT:   6: A d;
83f4a2713aSLionel Sambuc // CHECK-NEXT:   7: [B1.6].~A() (Implicit destructor)
84f4a2713aSLionel Sambuc // CHECK-NEXT:   8: [B1.4].~A() (Implicit destructor)
85f4a2713aSLionel Sambuc // CHECK-NEXT:   9:  (CXXConstructExpr, class A)
86f4a2713aSLionel Sambuc // CHECK:       10: A b;
87f4a2713aSLionel Sambuc // CHECK:       11: [B1.10].~A() (Implicit destructor)
88f4a2713aSLionel Sambuc // CHECK:       12: [B1.2].~A() (Implicit destructor)
89f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B2
90f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
91f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
92f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_scope()93f4a2713aSLionel Sambuc void test_scope() {
94f4a2713aSLionel Sambuc   A a;
95f4a2713aSLionel Sambuc   { A c;
96f4a2713aSLionel Sambuc     A d;
97f4a2713aSLionel Sambuc   }
98f4a2713aSLionel Sambuc   A b;
99f4a2713aSLionel Sambuc }
100f4a2713aSLionel Sambuc 
101f4a2713aSLionel Sambuc // CHECK:      [B4 (ENTRY)]
102f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B3
103f4a2713aSLionel Sambuc // CHECK:      [B1]
104f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
105f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
106f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B1.2].~A() (Implicit destructor)
107f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B3.4].~A() (Implicit destructor)
108f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B3.2].~A() (Implicit destructor)
109f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B3
110f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
111f4a2713aSLionel Sambuc // CHECK:      [B2]
112f4a2713aSLionel Sambuc // CHECK-NEXT:   1: return;
113f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B3.4].~A() (Implicit destructor)
114f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
115f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B3
116f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
117f4a2713aSLionel Sambuc // CHECK:      [B3]
118f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
119f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
120f4a2713aSLionel Sambuc // CHECK-NEXT:   3:  (CXXConstructExpr, class A)
121f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A b;
122f4a2713aSLionel Sambuc // CHECK-NEXT:   5: UV
123f4a2713aSLionel Sambuc // CHECK-NEXT:   6: [B3.5] (ImplicitCastExpr, LValueToRValue, _Bool)
124f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B3.6]
125f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
126f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B2 B1
127f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
128f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B1 B2
test_return()129f4a2713aSLionel Sambuc void test_return() {
130f4a2713aSLionel Sambuc   A a;
131f4a2713aSLionel Sambuc   A b;
132f4a2713aSLionel Sambuc   if (UV) return;
133f4a2713aSLionel Sambuc   A c;
134f4a2713aSLionel Sambuc }
135f4a2713aSLionel Sambuc 
136f4a2713aSLionel Sambuc // CHECK:      [B8 (ENTRY)]
137f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B7
138f4a2713aSLionel Sambuc // CHECK:      [B1]
139f4a2713aSLionel Sambuc // CHECK:       l1:
140f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
141f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
142f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B1.2].~A() (Implicit destructor)
143f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B6.2].~A() (Implicit destructor)
144f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B7.2].~A() (Implicit destructor)
145f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B2 B3
146f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
147f4a2713aSLionel Sambuc // CHECK:      [B2]
148f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
149f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A b;
150f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B2.2].~A() (Implicit destructor)
151f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B6.4].~A() (Implicit destructor)
152f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
153f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
154f4a2713aSLionel Sambuc // CHECK:      [B3]
155f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B6.4].~A() (Implicit destructor)
156f4a2713aSLionel Sambuc // CHECK-NEXT:   T: goto l1;
157f4a2713aSLionel Sambuc // CHECK:        Preds (1): B4
158f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
159f4a2713aSLionel Sambuc // CHECK:      [B4]
160f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
161f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B4.1] (ImplicitCastExpr, LValueToRValue, _Bool)
162f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B4.2]
163f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B6
164f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B3 B2
165f4a2713aSLionel Sambuc // CHECK:      [B5]
166f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B6.4].~A() (Implicit destructor)
167f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B6.2].~A() (Implicit destructor)
168f4a2713aSLionel Sambuc // CHECK-NEXT:   T: goto l0;
169f4a2713aSLionel Sambuc // CHECK:        Preds (1): B6
170f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B6
171f4a2713aSLionel Sambuc // CHECK:      [B6]
172f4a2713aSLionel Sambuc // CHECK:       l0:
173f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
174f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A b;
175f4a2713aSLionel Sambuc // CHECK-NEXT:   3:  (CXXConstructExpr, class A)
176f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A a;
177f4a2713aSLionel Sambuc // CHECK-NEXT:   5: UV
178f4a2713aSLionel Sambuc // CHECK-NEXT:   6: [B6.5] (ImplicitCastExpr, LValueToRValue, _Bool)
179f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B6.6]
180f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B7 B5
181f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B5 B4
182f4a2713aSLionel Sambuc // CHECK:      [B7]
183f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
184f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
185f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B8
186f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B6
187f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
188f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_goto()189f4a2713aSLionel Sambuc void test_goto() {
190f4a2713aSLionel Sambuc   A a;
191f4a2713aSLionel Sambuc l0:
192f4a2713aSLionel Sambuc   A b;
193f4a2713aSLionel Sambuc   { A a;
194f4a2713aSLionel Sambuc     if (UV) goto l0;
195f4a2713aSLionel Sambuc     if (UV) goto l1;
196f4a2713aSLionel Sambuc     A b;
197f4a2713aSLionel Sambuc   }
198f4a2713aSLionel Sambuc l1:
199f4a2713aSLionel Sambuc   A c;
200f4a2713aSLionel Sambuc }
201f4a2713aSLionel Sambuc 
202f4a2713aSLionel Sambuc // CHECK:      [B5 (ENTRY)]
203f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B4
204f4a2713aSLionel Sambuc // CHECK:      [B1]
205f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B4.6].~A() (Implicit destructor)
206f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B4.2].~A() (Implicit destructor)
207f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B2 B3
208f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
209f4a2713aSLionel Sambuc // CHECK:      [B2]
210f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
211f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
212f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B2.2].~A() (Implicit destructor)
213f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
214f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
215f4a2713aSLionel Sambuc // CHECK:      [B3]
216f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
217f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
218f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
219f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
220f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
221f4a2713aSLionel Sambuc // CHECK:      [B4]
222f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
223f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
224f4a2713aSLionel Sambuc // CHECK-NEXT:   3: a
225f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B4.3] (ImplicitCastExpr, NoOp, const class A)
226f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B4.4] (CXXConstructExpr, class A)
227f4a2713aSLionel Sambuc // CHECK-NEXT:   6: A b = a;
228f4a2713aSLionel Sambuc // CHECK-NEXT:   7: b
229f4a2713aSLionel Sambuc // CHECK-NEXT:   8: [B4.7] (ImplicitCastExpr, NoOp, const class A)
230f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B4.8].operator int
231*0a6a1f1dSLionel Sambuc // CHECK:       10: [B4.8]
232f4a2713aSLionel Sambuc // CHECK:       11: [B4.10] (ImplicitCastExpr, UserDefinedConversion, int)
233f4a2713aSLionel Sambuc // CHECK:       12: [B4.11] (ImplicitCastExpr, IntegralToBoolean, _Bool)
234f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B4.12]
235f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B5
236f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B3 B2
237f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
238f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_if_implicit_scope()239f4a2713aSLionel Sambuc void test_if_implicit_scope() {
240f4a2713aSLionel Sambuc   A a;
241f4a2713aSLionel Sambuc   if (A b = a)
242f4a2713aSLionel Sambuc     A c;
243f4a2713aSLionel Sambuc   else A c;
244f4a2713aSLionel Sambuc }
245f4a2713aSLionel Sambuc 
246f4a2713aSLionel Sambuc // CHECK:      [B9 (ENTRY)]
247f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B8
248f4a2713aSLionel Sambuc // CHECK:      [B1]
249f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B8.6].~A() (Implicit destructor)
250f4a2713aSLionel Sambuc // CHECK-NEXT:   2:  (CXXConstructExpr, class A)
251f4a2713aSLionel Sambuc // CHECK-NEXT:   3: A e;
252f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B1.3].~A() (Implicit destructor)
253f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B8.2].~A() (Implicit destructor)
254f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B2 B5
255f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
256f4a2713aSLionel Sambuc // CHECK:      [B2]
257f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
258f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A d;
259f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B2.2].~A() (Implicit destructor)
260f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B4.2].~A() (Implicit destructor)
261f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
262f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
263f4a2713aSLionel Sambuc // CHECK:      [B3]
264f4a2713aSLionel Sambuc // CHECK-NEXT:   1: return;
265f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B4.2].~A() (Implicit destructor)
266f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B8.6].~A() (Implicit destructor)
267f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B8.2].~A() (Implicit destructor)
268f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
269f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
270f4a2713aSLionel Sambuc // CHECK:      [B4]
271f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
272f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
273f4a2713aSLionel Sambuc // CHECK-NEXT:   3: UV
274f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B4.3] (ImplicitCastExpr, LValueToRValue, _Bool)
275f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B4.4]
276f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B8
277f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B3 B2
278f4a2713aSLionel Sambuc // CHECK:      [B5]
279f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
280f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A d;
281f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B5.2].~A() (Implicit destructor)
282f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B7.2].~A() (Implicit destructor)
283f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B7
284f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
285f4a2713aSLionel Sambuc // CHECK:      [B6]
286f4a2713aSLionel Sambuc // CHECK-NEXT:   1: return;
287f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B7.2].~A() (Implicit destructor)
288f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B8.6].~A() (Implicit destructor)
289f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B8.2].~A() (Implicit destructor)
290f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B7
291f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
292f4a2713aSLionel Sambuc // CHECK:      [B7]
293f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
294f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
295f4a2713aSLionel Sambuc // CHECK-NEXT:   3: UV
296f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B7.3] (ImplicitCastExpr, LValueToRValue, _Bool)
297f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B7.4]
298f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B8
299f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B6 B5
300f4a2713aSLionel Sambuc // CHECK:      [B8]
301f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
302f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
303f4a2713aSLionel Sambuc // CHECK-NEXT:   3: a
304f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B8.3] (ImplicitCastExpr, NoOp, const class A)
305f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B8.4] (CXXConstructExpr, class A)
306f4a2713aSLionel Sambuc // CHECK-NEXT:   6: A b = a;
307f4a2713aSLionel Sambuc // CHECK-NEXT:   7: b
308f4a2713aSLionel Sambuc // CHECK-NEXT:   8: [B8.7] (ImplicitCastExpr, NoOp, const class A)
309f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B8.8].operator int
310*0a6a1f1dSLionel Sambuc // CHECK:       10: [B8.8]
311f4a2713aSLionel Sambuc // CHECK:       11: [B8.10] (ImplicitCastExpr, UserDefinedConversion, int)
312f4a2713aSLionel Sambuc // CHECK:       12: [B8.11] (ImplicitCastExpr, IntegralToBoolean, _Bool)
313f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B8.12]
314f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B9
315f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B7 B4
316f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
317f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (3): B1 B3 B6
test_if_jumps()318f4a2713aSLionel Sambuc void test_if_jumps() {
319f4a2713aSLionel Sambuc   A a;
320f4a2713aSLionel Sambuc   if (A b = a) {
321f4a2713aSLionel Sambuc     A c;
322f4a2713aSLionel Sambuc     if (UV) return;
323f4a2713aSLionel Sambuc     A d;
324f4a2713aSLionel Sambuc   } else {
325f4a2713aSLionel Sambuc     A c;
326f4a2713aSLionel Sambuc     if (UV) return;
327f4a2713aSLionel Sambuc     A d;
328f4a2713aSLionel Sambuc   }
329f4a2713aSLionel Sambuc   A e;
330f4a2713aSLionel Sambuc }
331f4a2713aSLionel Sambuc 
332f4a2713aSLionel Sambuc // CHECK:      [B6 (ENTRY)]
333f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B5
334f4a2713aSLionel Sambuc // CHECK:      [B1]
335f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B4.4].~A() (Implicit destructor)
336f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B5.2].~A() (Implicit destructor)
337f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
338f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
339f4a2713aSLionel Sambuc // CHECK:      [B2]
340f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B3
341f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B4
342f4a2713aSLionel Sambuc // CHECK:      [B3]
343f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
344f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
345f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
346f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B4.4].~A() (Implicit destructor)
347f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
348f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
349f4a2713aSLionel Sambuc // CHECK:      [B4]
350f4a2713aSLionel Sambuc // CHECK-NEXT:   1: a
351f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
352f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B4.2] (CXXConstructExpr, class A)
353f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A b = a;
354f4a2713aSLionel Sambuc // CHECK-NEXT:   5: b
355f4a2713aSLionel Sambuc // CHECK-NEXT:   6: [B4.5] (ImplicitCastExpr, NoOp, const class A)
356f4a2713aSLionel Sambuc // CHECK-NEXT:   7: [B4.6].operator int
357*0a6a1f1dSLionel Sambuc // CHECK-NEXT:   8: [B4.6]
358f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B4.8] (ImplicitCastExpr, UserDefinedConversion, int)
359f4a2713aSLionel Sambuc // CHECK:       10: [B4.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
360f4a2713aSLionel Sambuc // CHECK-NEXT:   T: while [B4.10]
361f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B2 B5
362f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B3 B1
363f4a2713aSLionel Sambuc // CHECK:      [B5]
364f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
365f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
366f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B6
367f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B4
368f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
369f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_while_implicit_scope()370f4a2713aSLionel Sambuc void test_while_implicit_scope() {
371f4a2713aSLionel Sambuc   A a;
372f4a2713aSLionel Sambuc   while (A b = a)
373f4a2713aSLionel Sambuc     A c;
374f4a2713aSLionel Sambuc }
375f4a2713aSLionel Sambuc 
376f4a2713aSLionel Sambuc // CHECK:      [B12 (ENTRY)]
377f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B11
378f4a2713aSLionel Sambuc // CHECK:      [B1]
379f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B10.4].~A() (Implicit destructor)
380f4a2713aSLionel Sambuc // CHECK-NEXT:   2:  (CXXConstructExpr, class A)
381f4a2713aSLionel Sambuc // CHECK-NEXT:   3: A e;
382f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B1.3].~A() (Implicit destructor)
383f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B11.2].~A() (Implicit destructor)
384f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B8 B10
385f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
386f4a2713aSLionel Sambuc // CHECK:      [B2]
387f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B3 B6
388f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B10
389f4a2713aSLionel Sambuc // CHECK:      [B3]
390f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
391f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A d;
392f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
393f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B9.2].~A() (Implicit destructor)
394f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B10.4].~A() (Implicit destructor)
395f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B5
396f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
397f4a2713aSLionel Sambuc // CHECK:      [B4]
398f4a2713aSLionel Sambuc // CHECK-NEXT:   1: return;
399f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B9.2].~A() (Implicit destructor)
400f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B10.4].~A() (Implicit destructor)
401f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B11.2].~A() (Implicit destructor)
402f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B5
403f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
404f4a2713aSLionel Sambuc // CHECK:      [B5]
405f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
406f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B5.1] (ImplicitCastExpr, LValueToRValue, _Bool)
407f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B5.2]
408f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B7
409f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B4 B3
410f4a2713aSLionel Sambuc // CHECK:      [B6]
411f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B9.2].~A() (Implicit destructor)
412f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B10.4].~A() (Implicit destructor)
413f4a2713aSLionel Sambuc // CHECK-NEXT:   T: continue;
414f4a2713aSLionel Sambuc // CHECK:        Preds (1): B7
415f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
416f4a2713aSLionel Sambuc // CHECK:      [B7]
417f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
418f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
419f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B7.2]
420f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B9
421f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B6 B5
422f4a2713aSLionel Sambuc // CHECK:      [B8]
423f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B9.2].~A() (Implicit destructor)
424f4a2713aSLionel Sambuc // CHECK-NEXT:   T: break;
425f4a2713aSLionel Sambuc // CHECK:        Preds (1): B9
426f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
427f4a2713aSLionel Sambuc // CHECK:      [B9]
428f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
429f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
430f4a2713aSLionel Sambuc // CHECK-NEXT:   3: UV
431f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool)
432f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B9.4]
433f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B10
434f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B8 B7
435f4a2713aSLionel Sambuc // CHECK:      [B10]
436f4a2713aSLionel Sambuc // CHECK-NEXT:   1: a
437f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B10.1] (ImplicitCastExpr, NoOp, const class A)
438f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B10.2] (CXXConstructExpr, class A)
439f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A b = a;
440f4a2713aSLionel Sambuc // CHECK-NEXT:   5: b
441f4a2713aSLionel Sambuc // CHECK-NEXT:   6: [B10.5] (ImplicitCastExpr, NoOp, const class A)
442f4a2713aSLionel Sambuc // CHECK-NEXT:   7: [B10.6].operator int
443*0a6a1f1dSLionel Sambuc // CHECK-NEXT:   8: [B10.6]
444f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B10.8] (ImplicitCastExpr, UserDefinedConversion, int)
445f4a2713aSLionel Sambuc // CHECK:       10: [B10.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
446f4a2713aSLionel Sambuc // CHECK-NEXT:   T: while [B10.10]
447f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B2 B11
448f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B9 B1
449f4a2713aSLionel Sambuc // CHECK:      [B11]
450f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
451f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
452f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B12
453f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B10
454f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
455f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B1 B4
test_while_jumps()456f4a2713aSLionel Sambuc void test_while_jumps() {
457f4a2713aSLionel Sambuc   A a;
458f4a2713aSLionel Sambuc   while (A b = a) {
459f4a2713aSLionel Sambuc     A c;
460f4a2713aSLionel Sambuc     if (UV) break;
461f4a2713aSLionel Sambuc     if (UV) continue;
462f4a2713aSLionel Sambuc     if (UV) return;
463f4a2713aSLionel Sambuc     A d;
464f4a2713aSLionel Sambuc   }
465f4a2713aSLionel Sambuc   A e;
466f4a2713aSLionel Sambuc }
467f4a2713aSLionel Sambuc 
468f4a2713aSLionel Sambuc // CHECK:      [B4 (ENTRY)]
469f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
470f4a2713aSLionel Sambuc // CHECK:      [B1]
471f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
472f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B1.1] (ImplicitCastExpr, LValueToRValue, _Bool)
473f4a2713aSLionel Sambuc // CHECK-NEXT:   T: do ... while [B1.2]
474f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B2
475f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B3 B0
476f4a2713aSLionel Sambuc // CHECK:      [B2]
477f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
478f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
479f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B2.2].~A() (Implicit destructor)
480f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B3 B4
481f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
482f4a2713aSLionel Sambuc // CHECK:      [B3]
483f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
484f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
485f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
486f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_do_implicit_scope()487f4a2713aSLionel Sambuc void test_do_implicit_scope() {
488f4a2713aSLionel Sambuc   do A a;
489f4a2713aSLionel Sambuc   while (UV);
490f4a2713aSLionel Sambuc }
491f4a2713aSLionel Sambuc 
492f4a2713aSLionel Sambuc // CHECK:      [B12 (ENTRY)]
493f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B11
494f4a2713aSLionel Sambuc // CHECK:      [B1]
495f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
496f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A d;
497f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B1.2].~A() (Implicit destructor)
498f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B11.2].~A() (Implicit destructor)
499f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B8 B2
500f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
501f4a2713aSLionel Sambuc // CHECK:      [B2]
502f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
503f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B2.1] (ImplicitCastExpr, LValueToRValue, _Bool)
504f4a2713aSLionel Sambuc // CHECK-NEXT:   T: do ... while [B2.2]
505f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B3 B6
506f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B10 B1
507f4a2713aSLionel Sambuc // CHECK:      [B3]
508f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
509f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
510f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
511f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B9.2].~A() (Implicit destructor)
512f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B5
513f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
514f4a2713aSLionel Sambuc // CHECK:      [B4]
515f4a2713aSLionel Sambuc // CHECK-NEXT:   1: return;
516f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B9.2].~A() (Implicit destructor)
517f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B11.2].~A() (Implicit destructor)
518f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B5
519f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
520f4a2713aSLionel Sambuc // CHECK:      [B5]
521f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
522f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B5.1] (ImplicitCastExpr, LValueToRValue, _Bool)
523f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B5.2]
524f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B7
525f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B4 B3
526f4a2713aSLionel Sambuc // CHECK:      [B6]
527f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B9.2].~A() (Implicit destructor)
528f4a2713aSLionel Sambuc // CHECK-NEXT:   T: continue;
529f4a2713aSLionel Sambuc // CHECK:        Preds (1): B7
530f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
531f4a2713aSLionel Sambuc // CHECK:      [B7]
532f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
533f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
534f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B7.2]
535f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B9
536f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B6 B5
537f4a2713aSLionel Sambuc // CHECK:      [B8]
538f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B9.2].~A() (Implicit destructor)
539f4a2713aSLionel Sambuc // CHECK-NEXT:   T: break;
540f4a2713aSLionel Sambuc // CHECK:        Preds (1): B9
541f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
542f4a2713aSLionel Sambuc // CHECK:      [B9]
543f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
544f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A b;
545f4a2713aSLionel Sambuc // CHECK-NEXT:   3: UV
546f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool)
547f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B9.4]
548f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B10 B11
549f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B8 B7
550f4a2713aSLionel Sambuc // CHECK:      [B10]
551f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B2
552f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B9
553f4a2713aSLionel Sambuc // CHECK:      [B11]
554f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
555f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
556f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B12
557f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B9
558f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
559f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B1 B4
test_do_jumps()560f4a2713aSLionel Sambuc void test_do_jumps() {
561f4a2713aSLionel Sambuc   A a;
562f4a2713aSLionel Sambuc   do {
563f4a2713aSLionel Sambuc     A b;
564f4a2713aSLionel Sambuc     if (UV) break;
565f4a2713aSLionel Sambuc     if (UV) continue;
566f4a2713aSLionel Sambuc     if (UV) return;
567f4a2713aSLionel Sambuc     A c;
568f4a2713aSLionel Sambuc   } while (UV);
569f4a2713aSLionel Sambuc   A d;
570f4a2713aSLionel Sambuc }
571f4a2713aSLionel Sambuc 
572f4a2713aSLionel Sambuc // CHECK:      [B4 (ENTRY)]
573f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
574f4a2713aSLionel Sambuc // CHECK:      [B1]
575f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B2.6].~A() (Implicit destructor)
576f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B2.2].~A() (Implicit destructor)
577f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B3 B2
578f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
579f4a2713aSLionel Sambuc // CHECK:      [B2]
580f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
581f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
582f4a2713aSLionel Sambuc // CHECK-NEXT:   3: a
583f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B2.3] (ImplicitCastExpr, NoOp, const class A)
584f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B2.4] (CXXConstructExpr, class A)
585f4a2713aSLionel Sambuc // CHECK-NEXT:   6: A b = a;
586f4a2713aSLionel Sambuc // CHECK-NEXT:   7: b
587f4a2713aSLionel Sambuc // CHECK-NEXT:   8: [B2.7] (ImplicitCastExpr, NoOp, const class A)
588f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B2.8].operator int
589*0a6a1f1dSLionel Sambuc // CHECK:       10: [B2.8]
590f4a2713aSLionel Sambuc // CHECK:       11: [B2.10] (ImplicitCastExpr, UserDefinedConversion, int)
591f4a2713aSLionel Sambuc // CHECK-NEXT:   T: switch [B2.11]
592f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
593f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
594f4a2713aSLionel Sambuc // CHECK:      [B3]
595f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
596f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
597f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
598f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
599f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
600f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_switch_implicit_scope()601f4a2713aSLionel Sambuc void test_switch_implicit_scope() {
602f4a2713aSLionel Sambuc   A a;
603f4a2713aSLionel Sambuc   switch (A b = a)
604f4a2713aSLionel Sambuc     A c;
605f4a2713aSLionel Sambuc }
606f4a2713aSLionel Sambuc 
607f4a2713aSLionel Sambuc // CHECK:      [B9 (ENTRY)]
608f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
609f4a2713aSLionel Sambuc // CHECK:      [B1]
610f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B2.6].~A() (Implicit destructor)
611f4a2713aSLionel Sambuc // CHECK-NEXT:   2:  (CXXConstructExpr, class A)
612f4a2713aSLionel Sambuc // CHECK-NEXT:   3: A g;
613f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B1.3].~A() (Implicit destructor)
614f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B2.2].~A() (Implicit destructor)
615f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (3): B3 B7 B2
616f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
617f4a2713aSLionel Sambuc // CHECK:      [B2]
618f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
619f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
620f4a2713aSLionel Sambuc // CHECK-NEXT:   3: a
621f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B2.3] (ImplicitCastExpr, NoOp, const class A)
622f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B2.4] (CXXConstructExpr, class A)
623f4a2713aSLionel Sambuc // CHECK-NEXT:   6: A b = a;
624f4a2713aSLionel Sambuc // CHECK-NEXT:   7: b
625f4a2713aSLionel Sambuc // CHECK-NEXT:   8: [B2.7] (ImplicitCastExpr, NoOp, const class A)
626f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B2.8].operator int
627*0a6a1f1dSLionel Sambuc // CHECK:       10: [B2.8]
628f4a2713aSLionel Sambuc // CHECK:       11: [B2.10] (ImplicitCastExpr, UserDefinedConversion, int)
629f4a2713aSLionel Sambuc // CHECK-NEXT:   T: switch [B2.11]
630f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B9
631f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (3): B3 B8 B1
632f4a2713aSLionel Sambuc // CHECK:      [B3]
633f4a2713aSLionel Sambuc // CHECK:       case 1:
634f4a2713aSLionel Sambuc // CHECK-NEXT:   T: break;
635f4a2713aSLionel Sambuc // CHECK:        Preds (2): B2 B4
636f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
637f4a2713aSLionel Sambuc // CHECK:      [B4]
638f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
639f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A f;
640f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B4.2].~A() (Implicit destructor)
641f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B8.2].~A() (Implicit destructor)
642f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B6
643f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B3
644f4a2713aSLionel Sambuc // CHECK:      [B5]
645f4a2713aSLionel Sambuc // CHECK-NEXT:   1: return;
646f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B8.2].~A() (Implicit destructor)
647f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B2.6].~A() (Implicit destructor)
648f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B2.2].~A() (Implicit destructor)
649f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B6
650f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
651f4a2713aSLionel Sambuc // CHECK:      [B6]
652f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
653f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B6.1] (ImplicitCastExpr, LValueToRValue, _Bool)
654f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B6.2]
655f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B8
656f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B5 B4
657f4a2713aSLionel Sambuc // CHECK:      [B7]
658f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B8.2].~A() (Implicit destructor)
659f4a2713aSLionel Sambuc // CHECK-NEXT:   T: break;
660f4a2713aSLionel Sambuc // CHECK:        Preds (1): B8
661f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
662f4a2713aSLionel Sambuc // CHECK:      [B8]
663f4a2713aSLionel Sambuc // CHECK:       case 0:
664f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
665f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
666f4a2713aSLionel Sambuc // CHECK-NEXT:   3: UV
667f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B8.3] (ImplicitCastExpr, LValueToRValue, _Bool)
668f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B8.4]
669f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B2
670f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B7 B6
671f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
672f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B1 B5
test_switch_jumps()673f4a2713aSLionel Sambuc void test_switch_jumps() {
674f4a2713aSLionel Sambuc   A a;
675f4a2713aSLionel Sambuc   switch (A b = a) {
676f4a2713aSLionel Sambuc   case 0: {
677f4a2713aSLionel Sambuc     A c;
678f4a2713aSLionel Sambuc     if (UV) break;
679f4a2713aSLionel Sambuc     if (UV) return;
680f4a2713aSLionel Sambuc     A f;
681f4a2713aSLionel Sambuc   }
682f4a2713aSLionel Sambuc   case 1:
683f4a2713aSLionel Sambuc     break;
684f4a2713aSLionel Sambuc   }
685f4a2713aSLionel Sambuc   A g;
686f4a2713aSLionel Sambuc }
687f4a2713aSLionel Sambuc 
688f4a2713aSLionel Sambuc // CHECK:      [B6 (ENTRY)]
689f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B5
690f4a2713aSLionel Sambuc // CHECK:      [B1]
691f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B4.4].~A() (Implicit destructor)
692f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B5.2].~A() (Implicit destructor)
693f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
694f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
695f4a2713aSLionel Sambuc // CHECK:      [B2]
696f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B3
697f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B4
698f4a2713aSLionel Sambuc // CHECK:      [B3]
699f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
700f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A c;
701f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
702f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B4.4].~A() (Implicit destructor)
703f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B4
704f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
705f4a2713aSLionel Sambuc // CHECK:      [B4]
706f4a2713aSLionel Sambuc // CHECK-NEXT:   1: a
707f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
708f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B4.2] (CXXConstructExpr, class A)
709f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A b = a;
710f4a2713aSLionel Sambuc // CHECK-NEXT:   5: b
711f4a2713aSLionel Sambuc // CHECK-NEXT:   6: [B4.5] (ImplicitCastExpr, NoOp, const class A)
712f4a2713aSLionel Sambuc // CHECK-NEXT:   7: [B4.6].operator int
713*0a6a1f1dSLionel Sambuc // CHECK-NEXT:   8: [B4.6]
714f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B4.8] (ImplicitCastExpr, UserDefinedConversion, int)
715f4a2713aSLionel Sambuc // CHECK:       10: [B4.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
716f4a2713aSLionel Sambuc // CHECK-NEXT:   T: for (...; [B4.10]; )
717f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B2 B5
718f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B3 B1
719f4a2713aSLionel Sambuc // CHECK:      [B5]
720f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
721f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
722f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B6
723f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B4
724f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
725f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
test_for_implicit_scope()726f4a2713aSLionel Sambuc void test_for_implicit_scope() {
727f4a2713aSLionel Sambuc   for (A a; A b = a; )
728f4a2713aSLionel Sambuc     A c;
729f4a2713aSLionel Sambuc }
730f4a2713aSLionel Sambuc 
731f4a2713aSLionel Sambuc // CHECK:      [B12 (ENTRY)]
732f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B11
733f4a2713aSLionel Sambuc // CHECK:      [B1]
734f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B10.4].~A() (Implicit destructor)
735f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B11.4].~A() (Implicit destructor)
736f4a2713aSLionel Sambuc // CHECK-NEXT:   3:  (CXXConstructExpr, class A)
737f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A f;
738f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B1.4].~A() (Implicit destructor)
739f4a2713aSLionel Sambuc // CHECK-NEXT:   6: [B11.2].~A() (Implicit destructor)
740f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B8 B10
741f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
742f4a2713aSLionel Sambuc // CHECK:      [B2]
743f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B3 B6
744f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B10
745f4a2713aSLionel Sambuc // CHECK:      [B3]
746f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
747f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A e;
748f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B3.2].~A() (Implicit destructor)
749f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B9.2].~A() (Implicit destructor)
750f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B10.4].~A() (Implicit destructor)
751f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B5
752f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
753f4a2713aSLionel Sambuc // CHECK:      [B4]
754f4a2713aSLionel Sambuc // CHECK-NEXT:   1: return;
755f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B9.2].~A() (Implicit destructor)
756f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B10.4].~A() (Implicit destructor)
757f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B11.4].~A() (Implicit destructor)
758f4a2713aSLionel Sambuc // CHECK-NEXT:   5: [B11.2].~A() (Implicit destructor)
759f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B5
760f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
761f4a2713aSLionel Sambuc // CHECK:      [B5]
762f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
763f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B5.1] (ImplicitCastExpr, LValueToRValue, _Bool)
764f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B5.2]
765f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B7
766f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B4 B3
767f4a2713aSLionel Sambuc // CHECK:      [B6]
768f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B9.2].~A() (Implicit destructor)
769f4a2713aSLionel Sambuc // CHECK-NEXT:   T: continue;
770f4a2713aSLionel Sambuc // CHECK:        Preds (1): B7
771f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B2
772f4a2713aSLionel Sambuc // CHECK:      [B7]
773f4a2713aSLionel Sambuc // CHECK-NEXT:   1: UV
774f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
775f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B7.2]
776f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B9
777f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B6 B5
778f4a2713aSLionel Sambuc // CHECK:      [B8]
779f4a2713aSLionel Sambuc // CHECK-NEXT:   1: [B9.2].~A() (Implicit destructor)
780f4a2713aSLionel Sambuc // CHECK-NEXT:   T: break;
781f4a2713aSLionel Sambuc // CHECK:        Preds (1): B9
782f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B1
783f4a2713aSLionel Sambuc // CHECK:      [B9]
784f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
785f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A d;
786f4a2713aSLionel Sambuc // CHECK-NEXT:   3: UV
787f4a2713aSLionel Sambuc // CHECK-NEXT:   4: [B9.3] (ImplicitCastExpr, LValueToRValue, _Bool)
788f4a2713aSLionel Sambuc // CHECK-NEXT:   T: if [B9.4]
789f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B10
790f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B8 B7
791f4a2713aSLionel Sambuc // CHECK:      [B10]
792f4a2713aSLionel Sambuc // CHECK-NEXT:   1: b
793f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B10.1] (ImplicitCastExpr, NoOp, const class A)
794f4a2713aSLionel Sambuc // CHECK-NEXT:   3: [B10.2] (CXXConstructExpr, class A)
795f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A c = b;
796f4a2713aSLionel Sambuc // CHECK-NEXT:   5: c
797f4a2713aSLionel Sambuc // CHECK-NEXT:   6: [B10.5] (ImplicitCastExpr, NoOp, const class A)
798f4a2713aSLionel Sambuc // CHECK-NEXT:   7: [B10.6].operator int
799*0a6a1f1dSLionel Sambuc // CHECK-NEXT:   8: [B10.6]
800f4a2713aSLionel Sambuc // CHECK-NEXT:   9: [B10.8] (ImplicitCastExpr, UserDefinedConversion, int)
801f4a2713aSLionel Sambuc // CHECK:       10: [B10.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
802f4a2713aSLionel Sambuc // CHECK-NEXT:   T: for (...; [B10.10]; )
803f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B2 B11
804f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B9 B1
805f4a2713aSLionel Sambuc // CHECK:      [B11]
806f4a2713aSLionel Sambuc // CHECK-NEXT:   1:  (CXXConstructExpr, class A)
807f4a2713aSLionel Sambuc // CHECK-NEXT:   2: A a;
808f4a2713aSLionel Sambuc // CHECK-NEXT:   3:  (CXXConstructExpr, class A)
809f4a2713aSLionel Sambuc // CHECK-NEXT:   4: A b;
810f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B12
811f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B10
812f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
813f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (2): B1 B4
test_for_jumps()814f4a2713aSLionel Sambuc void test_for_jumps() {
815f4a2713aSLionel Sambuc   A a;
816f4a2713aSLionel Sambuc   for (A b; A c = b; ) {
817f4a2713aSLionel Sambuc     A d;
818f4a2713aSLionel Sambuc     if (UV) break;
819f4a2713aSLionel Sambuc     if (UV) continue;
820f4a2713aSLionel Sambuc     if (UV) return;
821f4a2713aSLionel Sambuc     A e;
822f4a2713aSLionel Sambuc   }
823f4a2713aSLionel Sambuc   A f;
824f4a2713aSLionel Sambuc }
825f4a2713aSLionel Sambuc 
826f4a2713aSLionel Sambuc // CHECK:      [B3 (ENTRY)]
827f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
828f4a2713aSLionel Sambuc // CHECK:      [B1]
829f4a2713aSLionel Sambuc // CHECK-NEXT:   T: try ...
830f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B2 B0
831f4a2713aSLionel Sambuc // CHECK:      [B2]
832f4a2713aSLionel Sambuc // CHECK-NEXT:  catch (const A &e):
833f4a2713aSLionel Sambuc // CHECK-NEXT:   1: catch (const A &e) {
834f4a2713aSLionel Sambuc // CHECK-NEXT:  }
835f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
836f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
837f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
838f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (3): B2 B1 B3
test_catch_const_ref()839f4a2713aSLionel Sambuc void test_catch_const_ref() {
840f4a2713aSLionel Sambuc   try {
841f4a2713aSLionel Sambuc   } catch (const A& e) {
842f4a2713aSLionel Sambuc   }
843f4a2713aSLionel Sambuc }
844f4a2713aSLionel Sambuc 
845f4a2713aSLionel Sambuc // CHECK:      [B3 (ENTRY)]
846f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
847f4a2713aSLionel Sambuc // CHECK:      [B1]
848f4a2713aSLionel Sambuc // CHECK-NEXT:   T: try ...
849f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (2): B2 B0
850f4a2713aSLionel Sambuc // CHECK:      [B2]
851f4a2713aSLionel Sambuc // CHECK-NEXT:  catch (A e):
852f4a2713aSLionel Sambuc // CHECK-NEXT:   1: catch (A e) {
853f4a2713aSLionel Sambuc // CHECK-NEXT:  }
854f4a2713aSLionel Sambuc // CHECK-NEXT:   2: [B2.1].~A() (Implicit destructor)
855f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (1): B1
856f4a2713aSLionel Sambuc // CHECK-NEXT:   Succs (1): B0
857f4a2713aSLionel Sambuc // CHECK:      [B0 (EXIT)]
858f4a2713aSLionel Sambuc // CHECK-NEXT:   Preds (3): B2 B1 B3
test_catch_copy()859f4a2713aSLionel Sambuc void test_catch_copy() {
860f4a2713aSLionel Sambuc   try {
861f4a2713aSLionel Sambuc   } catch (A e) {
862f4a2713aSLionel Sambuc   }
863f4a2713aSLionel Sambuc }
864