Clang Project

clang_source_code/test/Analysis/temp-obj-dtors-cfg-output.cpp
1// RUN: rm -f %t
2// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -analyzer-config cfg-rich-constructors=false -std=c++98 %s > %t 2>&1
3// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX98,WARNINGS,CXX98-WARNINGS %s
4// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -analyzer-config cfg-rich-constructors=false -std=c++11 %s > %t 2>&1
5// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,WARNINGS,CXX11-WARNINGS %s
6// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -analyzer-config cfg-rich-constructors=true -std=c++98 %s > %t 2>&1
7// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX98,ANALYZER,CXX98-ANALYZER %s
8// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -analyzer-config cfg-rich-constructors=true -std=c++11 %s > %t 2>&1
9// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,ANALYZER,CXX11-ANALYZER %s
10
11// This file tests how we construct two different flavors of the Clang CFG -
12// the CFG used by the Sema analysis-based warnings and the CFG used by the
13// static analyzer. The difference in the behavior is checked via FileCheck
14// prefixes (WARNINGS and ANALYZER respectively). When introducing new analyzer
15// flags, no new run lines should be added - just these flags would go to the
16// respective line depending on where is it turned on and where is it turned
17// off. Feel free to add tests that test only one of the CFG flavors if you're
18// not sure how the other flavor is supposed to work in your case.
19
20// Additionally, different C++ standards are checked.
21
22class A {
23public:
24  A() {}
25  ~A() {}
26
27  static A make() { return A(); }
28
29  operator bool() { return false; }
30  operator int() { return 0; }
31};
32
33class B {
34public:
35  B() {}
36  ~B() {}
37
38  operator bool() { return true; }
39  operator int() { return 1; }
40  operator A() { return A(); }
41};
42
43void foo(int);
44void foo(bool);
45void foo(const A&);
46
47void test_binary() {
48  int a = int(A()) + int(B());
49  foo(int(A()) + int(B()));
50  int b;
51}
52
53void test_and() {
54  bool a = A() && B();
55  foo(A() && B());
56  int b;
57}
58
59void test_or() {
60  bool a = A() || B();
61  foo(A() || B());
62  int b;
63}
64
65void test_cond() {
66  A a = B() ? A() : A(B());
67  if (B()) { foo(0); } else { foo(0); }
68  int b;
69}
70
71struct C {
72  C():b_(true) {}
73  ~C() {}
74
75  operator bool() { return b_; }
76  bool b_;
77};
78
79struct D {
80  D():b_(true) {}
81
82  operator bool() { return b_; }
83  bool b_;
84};
85
86int test_cond_unnamed_custom_destructor() {
87  if (C()) { return 1; } else { return 0; }
88}
89
90int test_cond_named_custom_destructor() {
91  if (C c = C()) { return 1; } else { return 0; }
92}
93
94int test_cond_unnamed_auto_destructor() {
95  if (D()) { return 1; } else { return 0; }
96}
97
98int test_cond_named_auto_destructor() {
99  if (D d = D()) { return 1; } else { return 0; }
100}
101
102void test_cond_cref() {
103  const A& a = B() ? A() : A(B());
104  foo(B() ? A() : A(B()));
105  int b;
106}
107
108void test_cond_implicit() {
109  A a = A() ?: A();
110  int b;
111}
112
113void test_cond_implicit_cref() {
114  const A& a = A() ?: A();
115  foo(A() ?: A());
116  int b;
117}
118
119void test_copy_init() {
120  A a = A();
121  int b;
122}
123
124void test_cref_init() {
125  const A& a = A();
126  foo(A());
127  int b;
128}
129
130void test_call_copy_init() {
131  A a = A::make();
132  int b;
133}
134
135void test_call_cref_init() {
136  const A& a = A::make();
137  foo(A::make());
138  int b;
139}
140
141void test_assign() {
142  int a;
143  a = A();
144  int b;
145}
146
147class TestCtorInits {
148  int a;
149  int b;
150public:
151  TestCtorInits();
152};
153
154TestCtorInits::TestCtorInits()
155  : a(int(A()) + int(B()))
156  , b() {}
157
158class NoReturn {
159public:
160  ~NoReturn() __attribute__((noreturn));
161  void f();
162};
163
164void test_noreturn1() {
165  int a;
166  NoReturn().f();
167  int b;
168}
169
170void test_noreturn2() {
171  int a;
172  NoReturn(), 47;
173  int b;
174}
175
176extern bool check(const NoReturn&);
177
178// PR16664 and PR18159
179int testConsistencyNestedSimple(bool value) {
180  if (value) {
181    if (!value || check(NoReturn())) {
182      return 1;
183    }
184  }
185  return 0;
186}
187
188// PR16664 and PR18159
189int testConsistencyNestedComplex(bool value) {
190  if (value) {
191    if (!value || !value || check(NoReturn())) {
192      return 1;
193    }
194  }
195  return 0;
196}
197
198// PR16664 and PR18159
199int testConsistencyNestedNormalReturn(bool value) {
200  if (value) {
201    if (!value || value || check(NoReturn())) {
202      return 1;
203    }
204  }
205  return 0;
206}
207
208namespace pass_references_through {
209class C {
210public:
211  ~C() {}
212};
213
214const C &foo1();
215C &&foo2();
216
217// In these examples the foo() expression has record type, not reference type.
218// Don't try to figure out how to perform construction of the record here.
219const C &bar1() { return foo1(); } // no-crash
220C &&bar2() { return foo2(); } // no-crash
221const C &bar3(bool coin) {
222  return coin ? foo1() : foo1(); // no-crash
223}
224} // end namespace pass_references_through
225
226// CHECK:   [B1 (ENTRY)]
227// CHECK:     Succs (1): B0
228// CHECK:   [B0 (EXIT)]
229// CHECK:     Preds (1): B1
230// CHECK:   [B1 (ENTRY)]
231// CHECK:     Succs (1): B0
232// CHECK:   [B0 (EXIT)]
233// CHECK:     Preds (1): B1
234// CHECK:   [B2 (ENTRY)]
235// CHECK:     Succs (1): B1
236// CHECK:   [B1]
237// WARNINGS:     1: A() (CXXConstructExpr, class A)
238// ANALYZER:     1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class A)
239// CHECK:     2: [B1.1] (BindTemporary)
240// CHECK:     3: [B1.2] (ImplicitCastExpr, NoOp, const class A)
241// CHECK:     4: [B1.3]
242// WARNINGS:     5: [B1.4] (CXXConstructExpr, class A)
243// ANALYZER:     5: [B1.4] (CXXConstructExpr, [B1.7], class A)
244// CHECK:     6: ~A() (Temporary object destructor)
245// CHECK:     7: return [B1.5];
246// CHECK:     Preds (1): B2
247// CHECK:     Succs (1): B0
248// CHECK:   [B0 (EXIT)]
249// CHECK:     Preds (1): B1
250// CHECK:   [B2 (ENTRY)]
251// CHECK:     Succs (1): B1
252// CHECK:   [B1]
253// CHECK:     1: false
254// CHECK:     2: return [B1.1];
255// CHECK:     Preds (1): B2
256// CHECK:     Succs (1): B0
257// CHECK:   [B0 (EXIT)]
258// CHECK:     Preds (1): B1
259// CHECK:   [B2 (ENTRY)]
260// CHECK:     Succs (1): B1
261// CHECK:   [B1]
262// CHECK:     1: 0
263// CHECK:     2: return [B1.1];
264// CHECK:     Preds (1): B2
265// CHECK:     Succs (1): B0
266// CHECK:   [B0 (EXIT)]
267// CHECK:     Preds (1): B1
268// CHECK:   [B1 (ENTRY)]
269// CHECK:     Succs (1): B0
270// CHECK:   [B0 (EXIT)]
271// CHECK:     Preds (1): B1
272// CHECK:   [B1 (ENTRY)]
273// CHECK:     Succs (1): B0
274// CHECK:   [B0 (EXIT)]
275// CHECK:     Preds (1): B1
276// CHECK:   [B2 (ENTRY)]
277// CHECK:     Succs (1): B1
278// CHECK:   [B1]
279// CHECK:     1: true
280// CHECK:     2: return [B1.1];
281// CHECK:     Preds (1): B2
282// CHECK:     Succs (1): B0
283// CHECK:   [B0 (EXIT)]
284// CHECK:     Preds (1): B1
285// CHECK:   [B2 (ENTRY)]
286// CHECK:     Succs (1): B1
287// CHECK:   [B1]
288// CHECK:     1: 1
289// CHECK:     2: return [B1.1];
290// CHECK:     Preds (1): B2
291// CHECK:     Succs (1): B0
292// CHECK:   [B0 (EXIT)]
293// CHECK:     Preds (1): B1
294// CHECK:   [B2 (ENTRY)]
295// CHECK:     Succs (1): B1
296// CHECK:   [B1]
297// WARNINGS:     1: A() (CXXConstructExpr, class A)
298// ANALYZER:     1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class A)
299// CHECK:     2: [B1.1] (BindTemporary)
300// CHECK:     3: [B1.2] (ImplicitCastExpr, NoOp, const class A)
301// CHECK:     4: [B1.3]
302// WARNINGS:     5: [B1.4] (CXXConstructExpr, class A)
303// ANALYZER:     5: [B1.4] (CXXConstructExpr, [B1.7], class A)
304// CHECK:     6: ~A() (Temporary object destructor)
305// CHECK:     7: return [B1.5];
306// CHECK:     Preds (1): B2
307// CHECK:     Succs (1): B0
308// CHECK:   [B0 (EXIT)]
309// CHECK:     Preds (1): B1
310// CHECK:   [B2 (ENTRY)]
311// CHECK:     Succs (1): B1
312// CHECK:   [B1]
313// WARNINGS:     1: A() (CXXConstructExpr, class A)
314// ANALYZER:     1: A() (CXXConstructExpr, [B1.2], [B1.3], class A)
315// CHECK:     2: [B1.1] (BindTemporary)
316// CHECK:     3: [B1.2]
317// CHECK:     4: [B1.3].operator int
318// CHECK:     5: [B1.3]
319// CHECK:     6: [B1.5] (ImplicitCastExpr, UserDefinedConversion, int)
320// CHECK:     7: int([B1.6]) (CXXFunctionalCastExpr, NoOp, int)
321// WARNINGS:     8: B() (CXXConstructExpr, class B)
322// ANALYZER:     8: B() (CXXConstructExpr, [B1.9], [B1.10], class B)
323// CHECK:     9: [B1.8] (BindTemporary)
324// CHECK:    10: [B1.9]
325// CHECK:    11: [B1.10].operator int
326// CHECK:    12: [B1.10]
327// CHECK:    13: [B1.12] (ImplicitCastExpr, UserDefinedConversion, int)
328// CHECK:    14: int([B1.13]) (CXXFunctionalCastExpr, NoOp, int)
329// CHECK:    15: [B1.7] + [B1.14]
330// CHECK:    16: int a = int(A()) + int(B());
331// CHECK:    17: ~B() (Temporary object destructor)
332// CHECK:    18: ~A() (Temporary object destructor)
333// CHECK:    19: foo
334// CHECK:    20: [B1.19] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(int))
335// WARNINGS:    21: A() (CXXConstructExpr, class A)
336// ANALYZER:    21: A() (CXXConstructExpr, [B1.22], [B1.23], class A)
337// CHECK:    22: [B1.21] (BindTemporary)
338// CHECK:    23: [B1.22]
339// CHECK:    24: [B1.23].operator int
340// CHECK:    25: [B1.23]
341// CHECK:    26: [B1.25] (ImplicitCastExpr, UserDefinedConversion, int)
342// CHECK:    27: int([B1.26]) (CXXFunctionalCastExpr, NoOp, int)
343// WARNINGS:    28: B() (CXXConstructExpr, class B)
344// ANALYZER:    28: B() (CXXConstructExpr, [B1.29], [B1.30], class B)
345// CHECK:    29: [B1.28] (BindTemporary)
346// CHECK:    30: [B1.29]
347// CHECK:    31: [B1.30].operator int
348// CHECK:    32: [B1.30]
349// CHECK:    33: [B1.32] (ImplicitCastExpr, UserDefinedConversion, int)
350// CHECK:    34: int([B1.33]) (CXXFunctionalCastExpr, NoOp, int)
351// CHECK:    35: [B1.27] + [B1.34]
352// CHECK:    36: [B1.20]([B1.35])
353// CHECK:    37: ~B() (Temporary object destructor)
354// CHECK:    38: ~A() (Temporary object destructor)
355// CHECK:    39: int b;
356// CHECK:     Preds (1): B2
357// CHECK:     Succs (1): B0
358// CHECK:   [B0 (EXIT)]
359// CHECK:     Preds (1): B1
360// CHECK:   [B10 (ENTRY)]
361// CHECK:     Succs (1): B9
362// CHECK:   [B1]
363// CHECK:     1: ~A() (Temporary object destructor)
364// CHECK:     2: int b;
365// CHECK:     Preds (2): B2 B3
366// CHECK:     Succs (1): B0
367// CHECK:   [B2]
368// CHECK:     1: ~B() (Temporary object destructor)
369// CHECK:     Preds (1): B3
370// CHECK:     Succs (1): B1
371// CHECK:   [B3]
372// CHECK:     1: [B5.9] && [B4.6]
373// CHECK:     2: [B5.3]([B3.1])
374// CHECK:     T: (Temp Dtor) [B4.2]
375// CHECK:     Preds (2): B4 B5
376// CHECK:     Succs (2): B2 B1
377// CHECK:   [B4]
378// WARNINGS:     1: B() (CXXConstructExpr, class B)
379// ANALYZER:     1: B() (CXXConstructExpr, [B4.2], [B4.3], class B)
380// CHECK:     2: [B4.1] (BindTemporary)
381// CHECK:     3: [B4.2]
382// CHECK:     4: [B4.3].operator bool
383// CHECK:     5: [B4.3]
384// CHECK:     6: [B4.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
385// CHECK:     Preds (1): B5
386// CHECK:     Succs (1): B3
387// CHECK:   [B5]
388// CHECK:     1: ~A() (Temporary object destructor)
389// CHECK:     2: foo
390// CHECK:     3: [B5.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(_Bool))
391// WARNINGS:     4: A() (CXXConstructExpr, class A)
392// ANALYZER:     4: A() (CXXConstructExpr, [B5.5], [B5.6], class A)
393// CHECK:     5: [B5.4] (BindTemporary)
394// CHECK:     6: [B5.5]
395// CHECK:     7: [B5.6].operator bool
396// CHECK:     8: [B5.6]
397// CHECK:     9: [B5.8] (ImplicitCastExpr, UserDefinedConversion, _Bool)
398// CHECK:     T: [B5.9] && ...
399// CHECK:     Preds (2): B6 B7
400// CHECK:     Succs (2): B4 B3
401// CHECK:   [B6]
402// CHECK:     1: ~B() (Temporary object destructor)
403// CHECK:     Preds (1): B7
404// CHECK:     Succs (1): B5
405// CHECK:   [B7]
406// CHECK:     1: [B9.6] && [B8.6]
407// CHECK:     2: bool a = A() && B();
408// CHECK:     T: (Temp Dtor) [B8.2]
409// CHECK:     Preds (2): B8 B9
410// CHECK:     Succs (2): B6 B5
411// CHECK:   [B8]
412// WARNINGS:     1: B() (CXXConstructExpr, class B)
413// ANALYZER:     1: B() (CXXConstructExpr, [B8.2], [B8.3], class B)
414// CHECK:     2: [B8.1] (BindTemporary)
415// CHECK:     3: [B8.2]
416// CHECK:     4: [B8.3].operator bool
417// CHECK:     5: [B8.3]
418// CHECK:     6: [B8.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
419// CHECK:     Preds (1): B9
420// CHECK:     Succs (1): B7
421// CHECK:   [B9]
422// WARNINGS:     1: A() (CXXConstructExpr, class A)
423// ANALYZER:     1: A() (CXXConstructExpr, [B9.2], [B9.3], class A)
424// CHECK:     2: [B9.1] (BindTemporary)
425// CHECK:     3: [B9.2]
426// CHECK:     4: [B9.3].operator bool
427// CHECK:     5: [B9.3]
428// CHECK:     6: [B9.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
429// CHECK:     T: [B9.6] && ...
430// CHECK:     Preds (1): B10
431// CHECK:     Succs (2): B8 B7
432// CHECK:   [B0 (EXIT)]
433// CHECK:     Preds (1): B1
434// CHECK:   [B10 (ENTRY)]
435// CHECK:     Succs (1): B9
436// CHECK:   [B1]
437// CHECK:     1: ~A() (Temporary object destructor)
438// CHECK:     2: int b;
439// CHECK:     Preds (2): B2 B3
440// CHECK:     Succs (1): B0
441// CHECK:   [B2]
442// CHECK:     1: ~B() (Temporary object destructor)
443// CHECK:     Preds (1): B3
444// CHECK:     Succs (1): B1
445// CHECK:   [B3]
446// CHECK:     1: [B5.9] || [B4.6]
447// CHECK:     2: [B5.3]([B3.1])
448// CHECK:     T: (Temp Dtor) [B4.2]
449// CHECK:     Preds (2): B4 B5
450// CHECK:     Succs (2): B2 B1
451// CHECK:   [B4]
452// WARNINGS:     1: B() (CXXConstructExpr, class B)
453// ANALYZER:     1: B() (CXXConstructExpr, [B4.2], [B4.3], class B)
454// CHECK:     2: [B4.1] (BindTemporary)
455// CHECK:     3: [B4.2]
456// CHECK:     4: [B4.3].operator bool
457// CHECK:     5: [B4.3]
458// CHECK:     6: [B4.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
459// CHECK:     Preds (1): B5
460// CHECK:     Succs (1): B3
461// CHECK:   [B5]
462// CHECK:     1: ~A() (Temporary object destructor)
463// CHECK:     2: foo
464// CHECK:     3: [B5.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(_Bool))
465// WARNINGS:     4: A() (CXXConstructExpr, class A)
466// ANALYZER:     4: A() (CXXConstructExpr, [B5.5], [B5.6], class A)
467// CHECK:     5: [B5.4] (BindTemporary)
468// CHECK:     6: [B5.5]
469// CHECK:     7: [B5.6].operator bool
470// CHECK:     8: [B5.6]
471// CHECK:     9: [B5.8] (ImplicitCastExpr, UserDefinedConversion, _Bool)
472// CHECK:     T: [B5.9] || ...
473// CHECK:     Preds (2): B6 B7
474// CHECK:     Succs (2): B3 B4
475// CHECK:   [B6]
476// CHECK:     1: ~B() (Temporary object destructor)
477// CHECK:     Preds (1): B7
478// CHECK:     Succs (1): B5
479// CHECK:   [B7]
480// CHECK:     1: [B9.6] || [B8.6]
481// CHECK:     2: bool a = A() || B();
482// CHECK:     T: (Temp Dtor) [B8.2]
483// CHECK:     Preds (2): B8 B9
484// CHECK:     Succs (2): B6 B5
485// CHECK:   [B8]
486// WARNINGS:     1: B() (CXXConstructExpr, class B)
487// ANALYZER:     1: B() (CXXConstructExpr, [B8.2], [B8.3], class B)
488// CHECK:     2: [B8.1] (BindTemporary)
489// CHECK:     3: [B8.2]
490// CHECK:     4: [B8.3].operator bool
491// CHECK:     5: [B8.3]
492// CHECK:     6: [B8.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
493// CHECK:     Preds (1): B9
494// CHECK:     Succs (1): B7
495// CHECK:   [B9]
496// WARNINGS:     1: A() (CXXConstructExpr, class A)
497// ANALYZER:     1: A() (CXXConstructExpr, [B9.2], [B9.3], class A)
498// CHECK:     2: [B9.1] (BindTemporary)
499// CHECK:     3: [B9.2]
500// CHECK:     4: [B9.3].operator bool
501// CHECK:     5: [B9.3]
502// CHECK:     6: [B9.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
503// CHECK:     T: [B9.6] || ...
504// CHECK:     Preds (1): B10
505// CHECK:     Succs (2): B7 B8
506// CHECK:   [B0 (EXIT)]
507// CHECK:     Preds (1): B1
508// CHECK:   [B11 (ENTRY)]
509// CHECK:     Succs (1): B10
510// CHECK:   [B1]
511// CHECK:     1: int b;
512// CHECK:     2: [B7.5].~A() (Implicit destructor)
513// CHECK:     Preds (2): B2 B3
514// CHECK:     Succs (1): B0
515// CHECK:   [B2]
516// CHECK:     1: foo
517// CHECK:     2: [B2.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(int))
518// CHECK:     3: 0
519// CHECK:     4: [B2.2]([B2.3])
520// CHECK:     Preds (1): B4
521// CHECK:     Succs (1): B1
522// CHECK:   [B3]
523// CHECK:     1: foo
524// CHECK:     2: [B3.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(int))
525// CHECK:     3: 0
526// CHECK:     4: [B3.2]([B3.3])
527// CHECK:     Preds (1): B4
528// CHECK:     Succs (1): B1
529// CHECK:   [B4]
530// CHECK:     1: ~B() (Temporary object destructor)
531// WARNINGS:     2: B() (CXXConstructExpr, class B)
532// ANALYZER:     2: B() (CXXConstructExpr, [B4.3], [B4.4], class B)
533// CHECK:     3: [B4.2] (BindTemporary)
534// CHECK:     4: [B4.3]
535// CHECK:     5: [B4.4].operator bool
536// CHECK:     6: [B4.4]
537// CHECK:     7: [B4.6] (ImplicitCastExpr, UserDefinedConversion, _Bool)
538// CHECK:     8: ~B() (Temporary object destructor)
539// CHECK:     T: if [B4.7]
540// CHECK:     Preds (2): B5 B6
541// CHECK:     Succs (2): B3 B2
542// CHECK:   [B5]
543// CHECK:     1: ~A() (Temporary object destructor)
544// CHECK:     2: ~A() (Temporary object destructor)
545// CHECK:     Preds (1): B7
546// CHECK:     Succs (1): B4
547// CHECK:   [B6]
548// CHECK:     1: ~A() (Temporary object destructor)
549// CHECK:     2: ~A() (Temporary object destructor)
550// CHECK:     3: ~A() (Temporary object destructor)
551// CHECK:     4: ~B() (Temporary object destructor)
552// CHECK:     Preds (1): B7
553// CHECK:     Succs (1): B4
554// CHECK:   [B7]
555// CHECK:     1: [B10.6] ? [B8.6] : [B9.16]
556// CHECK:     2: [B7.1] (ImplicitCastExpr, NoOp, const class A)
557// CHECK:     3: [B7.2]
558// WARNINGS:     4: [B7.3] (CXXConstructExpr, class A)
559// ANALYZER:     4: [B7.3] (CXXConstructExpr, [B7.5], class A)
560// CHECK:     5: A a = B() ? A() : A(B());
561// CHECK:     T: (Temp Dtor) [B9.2]
562// CHECK:     Preds (2): B8 B9
563// CHECK:     Succs (2): B6 B5
564// CHECK:   [B8]
565// WARNINGS:     1: A() (CXXConstructExpr, class A)
566// ANALYZER:     1: A() (CXXConstructExpr, [B8.2], [B8.4], [B8.5], class A)
567// CHECK:     2: [B8.1] (BindTemporary)
568// CHECK:     3: [B8.2] (ImplicitCastExpr, NoOp, const class A)
569// CHECK:     4: [B8.3]
570// WARNINGS:     5: [B8.4] (CXXConstructExpr, class A)
571// ANALYZER:     5: [B8.4] (CXXConstructExpr, [B8.6], [B7.3], [B7.4], class A)
572// CHECK:     6: [B8.5] (BindTemporary)
573// CHECK:     Preds (1): B10
574// CHECK:     Succs (1): B7
575// CHECK:   [B9]
576// WARNINGS:     1: B() (CXXConstructExpr, class B)
577// ANALYZER:     1: B() (CXXConstructExpr, [B9.2], [B9.3], class B)
578// CHECK:     2: [B9.1] (BindTemporary)
579// CHECK:     3: [B9.2]
580// CHECK:     4: [B9.3].operator A
581// CHECK:     5: [B9.3]
582// CHECK:     6: [B9.5] (ImplicitCastExpr, UserDefinedConversion, class A)
583// CHECK:     7: [B9.6] (BindTemporary)
584// CHECK:     8: [B9.7] (ImplicitCastExpr, NoOp, const class A)
585// CHECK:     9: [B9.8]
586// WARNINGS:     10: [B9.9] (CXXConstructExpr, class A)
587// ANALYZER:     10: [B9.9] (CXXConstructExpr, [B9.11], [B9.14], [B9.15], class A)
588// CHECK:    11: [B9.10] (BindTemporary)
589// CHECK:    12: A([B9.11]) (CXXFunctionalCastExpr, ConstructorConversion, class A)
590// CHECK:    13: [B9.12] (ImplicitCastExpr, NoOp, const class A)
591// CHECK:    14: [B9.13]
592// WARNINGS:    15: [B9.14] (CXXConstructExpr, class A)
593// ANALYZER:    15: [B9.14] (CXXConstructExpr, [B9.16], [B7.3], [B7.4], class A)
594// CHECK:    16: [B9.15] (BindTemporary)
595// CHECK:     Preds (1): B10
596// CHECK:     Succs (1): B7
597// CHECK:   [B10]
598// WARNINGS:     1: B() (CXXConstructExpr, class B)
599// ANALYZER:     1: B() (CXXConstructExpr, [B10.2], [B10.3], class B)
600// CHECK:     2: [B10.1] (BindTemporary)
601// CHECK:     3: [B10.2]
602// CHECK:     4: [B10.3].operator bool
603// CHECK:     5: [B10.3]
604// CHECK:     6: [B10.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
605// CHECK:     T: [B10.6] ? ... : ...
606// CHECK:     Preds (1): B11
607// CHECK:     Succs (2): B8 B9
608// CHECK:   [B0 (EXIT)]
609// CHECK:     Preds (1): B1
610// CHECK:   [B2 (ENTRY)]
611// CHECK:     Succs (1): B1
612// CHECK:   [B1]
613// CHECK:     1: true
614// CHECK:     2: b_([B1.1]) (Member initializer)
615// CHECK:     Preds (1): B2
616// CHECK:     Succs (1): B0
617// CHECK:   [B0 (EXIT)]
618// CHECK:     Preds (1): B1
619// CHECK:   [B1 (ENTRY)]
620// CHECK:     Succs (1): B0
621// CHECK:   [B0 (EXIT)]
622// CHECK:     Preds (1): B1
623// CHECK:   [B2 (ENTRY)]
624// CHECK:     Succs (1): B1
625// CHECK:   [B1]
626// CHECK:     1: this
627// CHECK:     2: [B1.1]->b_
628// CHECK:     3: [B1.2] (ImplicitCastExpr, LValueToRValue, _Bool)
629// CHECK:     4: return [B1.3];
630// CHECK:     Preds (1): B2
631// CHECK:     Succs (1): B0
632// CHECK:   [B0 (EXIT)]
633// CHECK:     Preds (1): B1
634// CHECK:   [B2 (ENTRY)]
635// CHECK:     Succs (1): B1
636// CHECK:   [B1]
637// CHECK:     1: true
638// CHECK:     2: b_([B1.1]) (Member initializer)
639// CHECK:     Preds (1): B2
640// CHECK:     Succs (1): B0
641// CHECK:   [B0 (EXIT)]
642// CHECK:     Preds (1): B1
643// CHECK:   [B2 (ENTRY)]
644// CHECK:     Succs (1): B1
645// CHECK:   [B1]
646// CHECK:     1: this
647// CHECK:     2: [B1.1]->b_
648// CHECK:     3: [B1.2] (ImplicitCastExpr, LValueToRValue, _Bool)
649// CHECK:     4: return [B1.3];
650// CHECK:     Preds (1): B2
651// CHECK:     Succs (1): B0
652// CHECK:   [B0 (EXIT)]
653// CHECK:     Preds (1): B1
654// CHECK:   [B4 (ENTRY)]
655// CHECK:     Succs (1): B3
656// CHECK:   [B1]
657// CHECK:     1: 0
658// CHECK:     2: return [B1.1];
659// CHECK:     Preds (1): B3
660// CHECK:     Succs (1): B0
661// CHECK:   [B2]
662// CHECK:     1: 1
663// CHECK:     2: return [B2.1];
664// CHECK:     Preds (1): B3
665// CHECK:     Succs (1): B0
666// CHECK:   [B3]
667// WARNINGS:     1: C() (CXXConstructExpr, struct C)
668// ANALYZER:     1: C() (CXXConstructExpr, [B3.2], [B3.3], struct C)
669// CHECK:     2: [B3.1] (BindTemporary)
670// CHECK:     3: [B3.2]
671// CHECK:     4: [B3.3].operator bool
672// CHECK:     5: [B3.3]
673// CHECK:     6: [B3.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
674// CHECK:     7: ~C() (Temporary object destructor)
675// CHECK:     T: if [B3.6]
676// CHECK:     Preds (1): B4
677// CHECK:     Succs (2): B2 B1
678// CHECK:   [B0 (EXIT)]
679// CHECK:     Preds (2): B1 B2
680// CHECK:   [B5 (ENTRY)]
681// CHECK:     Succs (1): B4
682// CHECK:   [B1]
683// CHECK:     1: [B4.6].~C() (Implicit destructor)
684// CHECK:     Succs (1): B0
685// CHECK:   [B2]
686// CHECK:     1: 0
687// CHECK:     2: return [B2.1];
688// CHECK:     3: [B4.6].~C() (Implicit destructor)
689// CHECK:     Preds (1): B4
690// CHECK:     Succs (1): B0
691// CHECK:   [B3]
692// CHECK:     1: 1
693// CHECK:     2: return [B3.1];
694// CHECK:     3: [B4.6].~C() (Implicit destructor)
695// CHECK:     Preds (1): B4
696// CHECK:     Succs (1): B0
697// CHECK:   [B4]
698// WARNINGS:     1: C() (CXXConstructExpr, struct C)
699// ANALYZER:     1: C() (CXXConstructExpr, [B4.2], [B4.4], [B4.5], struct C)
700// CHECK:     2: [B4.1] (BindTemporary)
701// CHECK:     3: [B4.2] (ImplicitCastExpr, NoOp, const struct C)
702// CHECK:     4: [B4.3]
703// WARNINGS:     5: [B4.4] (CXXConstructExpr, struct C)
704// ANALYZER:     5: [B4.4] (CXXConstructExpr, [B4.6], struct C)
705// CHECK:     6: C c = C();
706// CHECK:     7: ~C() (Temporary object destructor)
707// CHECK:     8: c
708// CHECK:     9: [B4.8].operator bool
709// CHECK:    10: [B4.8]
710// CHECK:    11: [B4.10] (ImplicitCastExpr, UserDefinedConversion, _Bool)
711// CHECK:     T: if [B4.11]
712// CHECK:     Preds (1): B5
713// CHECK:     Succs (2): B3 B2
714// CHECK:   [B0 (EXIT)]
715// CHECK:     Preds (3): B1 B2 B3
716// CHECK:   [B4 (ENTRY)]
717// CHECK:     Succs (1): B3
718// CHECK:   [B1]
719// CHECK:     1: 0
720// CHECK:     2: return [B1.1];
721// CHECK:     Preds (1): B3
722// CHECK:     Succs (1): B0
723// CHECK:   [B2]
724// CHECK:     1: 1
725// CHECK:     2: return [B2.1];
726// CHECK:     Preds (1): B3
727// CHECK:     Succs (1): B0
728// CHECK:   [B3]
729// WARNINGS:  1: D() (CXXConstructExpr, struct D)
730// ANALYZER:  1: D() (CXXConstructExpr, [B3.2], struct D)
731// CHECK:     2: [B3.1]
732// CHECK:     3: [B3.2].operator bool
733// CHECK:     4: [B3.2]
734// CHECK:     5: [B3.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
735// CHECK:     T: if [B3.5]
736// CHECK:     Preds (1): B4
737// CHECK:     Succs (2): B2 B1
738// CHECK:   [B0 (EXIT)]
739// CHECK:     Preds (2): B1 B2
740// CHECK:   [B4 (ENTRY)]
741// CHECK:     Succs (1): B3
742// CHECK:   [B1]
743// CHECK:     1: 0
744// CHECK:     2: return [B1.1];
745// CHECK:     Preds (1): B3
746// CHECK:     Succs (1): B0
747// CHECK:   [B2]
748// CHECK:     1: 1
749// CHECK:     2: return [B2.1];
750// CHECK:     Preds (1): B3
751// CHECK:     Succs (1): B0
752// CHECK:   [B3]
753// CXX98-WARNINGS:     1: D() (CXXConstructExpr, struct D)
754// CXX98-ANALYZER:     1: D() (CXXConstructExpr, [B3.3], [B3.4], struct D)
755// CXX98:     2: [B3.1] (ImplicitCastExpr, NoOp, const struct D)
756// CXX98:     3: [B3.2]
757// CXX98-WARNINGS:     4: [B3.3] (CXXConstructExpr, struct D)
758// CXX98-ANALYZER:     4: [B3.3] (CXXConstructExpr, [B3.5], struct D)
759// CXX98:     5: D d = D();
760// CXX98:     6: d
761// CXX98:     7: [B3.6].operator bool
762// CXX98:     8: [B3.6]
763// CXX98:     9: [B3.8] (ImplicitCastExpr, UserDefinedConversion, _Bool)
764// CXX98:     T: if [B3.9]
765// CXX11-WARNINGS:     1: D() (CXXConstructExpr, struct D)
766// CXX11-ANALYZER:     1: D() (CXXConstructExpr, [B3.2], [B3.3], struct D)
767// CXX11:     2: [B3.1]
768// CXX11-WARNINGS:     3: [B3.2] (CXXConstructExpr, struct D)
769// CXX11-ANALYZER:     3: [B3.2] (CXXConstructExpr, [B3.4], struct D)
770// CXX11:     4: D d = D();
771// CXX11:     5: d
772// CXX11:     6: [B3.5].operator bool
773// CXX11:     7: [B3.5]
774// CXX11:     8: [B3.7] (ImplicitCastExpr, UserDefinedConversion, _Bool)
775// CXX11:     T: if [B3.8]
776// CHECK:     Preds (1): B4
777// CHECK:     Succs (2): B2 B1
778// CHECK:   [B0 (EXIT)]
779// CHECK:     Preds (2): B1 B2
780// CHECK:   [B14 (ENTRY)]
781// CHECK:     Succs (1): B13
782// CHECK:   [B1]
783// CHECK:     1: ~B() (Temporary object destructor)
784// CHECK:     2: int b;
785// CHECK:     3: [B10.4].~A() (Implicit destructor)
786// CHECK:     Preds (2): B2 B3
787// CHECK:     Succs (1): B0
788// CHECK:   [B2]
789// CHECK:     1: ~A() (Temporary object destructor)
790// CHECK:     2: ~A() (Temporary object destructor)
791// CHECK:     Preds (1): B4
792// CHECK:     Succs (1): B1
793// CHECK:   [B3]
794// CHECK:     1: ~A() (Temporary object destructor)
795// CHECK:     2: ~A() (Temporary object destructor)
796// CHECK:     3: ~A() (Temporary object destructor)
797// CHECK:     4: ~B() (Temporary object destructor)
798// CHECK:     Preds (1): B4
799// CHECK:     Succs (1): B1
800// CHECK:   [B4]
801// CHECK:     1: [B7.9] ? [B5.6] : [B6.16]
802// CHECK:     2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
803// CHECK:     3: [B4.2]
804// CHECK:     4: [B7.3]([B4.3])
805// CHECK:     T: (Temp Dtor) [B6.2]
806// CHECK:     Preds (2): B5 B6
807// CHECK:     Succs (2): B3 B2
808// CHECK:   [B5]
809// WARNINGS:     1: A() (CXXConstructExpr, class A)
810// ANALYZER:     1: A() (CXXConstructExpr, [B5.2], [B5.4], [B5.5], class A)
811// CHECK:     2: [B5.1] (BindTemporary)
812// CHECK:     3: [B5.2] (ImplicitCastExpr, NoOp, const class A)
813// CHECK:     4: [B5.3]
814// WARNINGS:     5: [B5.4] (CXXConstructExpr, class A)
815// ANALYZER:     5: [B5.4] (CXXConstructExpr, [B5.6], [B4.3], class A)
816// CHECK:     6: [B5.5] (BindTemporary)
817// CHECK:     Preds (1): B7
818// CHECK:     Succs (1): B4
819// CHECK:   [B6]
820// WARNINGS:     1: B() (CXXConstructExpr, class B)
821// ANALYZER:     1: B() (CXXConstructExpr, [B6.2], [B6.3], class B)
822// CHECK:     2: [B6.1] (BindTemporary)
823// CHECK:     3: [B6.2]
824// CHECK:     4: [B6.3].operator A
825// CHECK:     5: [B6.3]
826// CHECK:     6: [B6.5] (ImplicitCastExpr, UserDefinedConversion, class A)
827// CHECK:     7: [B6.6] (BindTemporary)
828// CHECK:     8: [B6.7] (ImplicitCastExpr, NoOp, const class A)
829// CHECK:     9: [B6.8]
830// WARNINGS:     10: [B6.9] (CXXConstructExpr, class A)
831// ANALYZER:     10: [B6.9] (CXXConstructExpr, [B6.11], [B6.14], [B6.15], class A)
832// CHECK:    11: [B6.10] (BindTemporary)
833// CHECK:    12: A([B6.11]) (CXXFunctionalCastExpr, ConstructorConversion, class A)
834// CHECK:    13: [B6.12] (ImplicitCastExpr, NoOp, const class A)
835// CHECK:    14: [B6.13]
836// WARNINGS:    15: [B6.14] (CXXConstructExpr, class A)
837// ANALYZER:    15: [B6.14] (CXXConstructExpr, [B6.16], [B4.3], class A)
838// CHECK:    16: [B6.15] (BindTemporary)
839// CHECK:     Preds (1): B7
840// CHECK:     Succs (1): B4
841// CHECK:   [B7]
842// CHECK:     1: ~B() (Temporary object destructor)
843// CHECK:     2: foo
844// CHECK:     3: [B7.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &))
845// WARNINGS:     4: B() (CXXConstructExpr, class B)
846// ANALYZER:     4: B() (CXXConstructExpr, [B7.5], [B7.6], class B)
847// CHECK:     5: [B7.4] (BindTemporary)
848// CHECK:     6: [B7.5]
849// CHECK:     7: [B7.6].operator bool
850// CHECK:     8: [B7.6]
851// CHECK:     9: [B7.8] (ImplicitCastExpr, UserDefinedConversion, _Bool)
852// CHECK:     T: [B7.9] ? ... : ...
853// CHECK:     Preds (2): B8 B9
854// CHECK:     Succs (2): B5 B6
855// CHECK:   [B8]
856// CHECK:     1: ~A() (Temporary object destructor)
857// CHECK:     Preds (1): B10
858// CHECK:     Succs (1): B7
859// CHECK:   [B9]
860// CHECK:     1: ~A() (Temporary object destructor)
861// CHECK:     2: ~A() (Temporary object destructor)
862// CHECK:     3: ~B() (Temporary object destructor)
863// CHECK:     Preds (1): B10
864// CHECK:     Succs (1): B7
865// CHECK:   [B10]
866// CHECK:     1: [B13.6] ? [B11.6] : [B12.16]
867// CHECK:     2: [B10.1] (ImplicitCastExpr, NoOp, const class A)
868// CHECK:     3: [B10.2]
869// CHECK:     4: const A &a = B() ? A() : A(B());
870// CHECK:     T: (Temp Dtor) [B12.2]
871// CHECK:     Preds (2): B11 B12
872// CHECK:     Succs (2): B9 B8
873// CHECK:   [B11]
874// WARNINGS:     1: A() (CXXConstructExpr, class A)
875// ANALYZER:     1: A() (CXXConstructExpr, [B11.2], [B11.4], [B11.5], class A)
876// CHECK:     2: [B11.1] (BindTemporary)
877// CHECK:     3: [B11.2] (ImplicitCastExpr, NoOp, const class A)
878// CHECK:     4: [B11.3]
879// WARNINGS:     5: [B11.4] (CXXConstructExpr, class A)
880// ANALYZER:     5: [B11.4] (CXXConstructExpr, [B10.3], class A)
881// CHECK:     6: [B11.5] (BindTemporary)
882// CHECK:     Preds (1): B13
883// CHECK:     Succs (1): B10
884// CHECK:   [B12]
885// WARNINGS:     1: B() (CXXConstructExpr, class B)
886// ANALYZER:     1: B() (CXXConstructExpr, [B12.2], [B12.3], class B)
887// CHECK:     2: [B12.1] (BindTemporary)
888// CHECK:     3: [B12.2]
889// CHECK:     4: [B12.3].operator A
890// CHECK:     5: [B12.3]
891// CHECK:     6: [B12.5] (ImplicitCastExpr, UserDefinedConversion, class A)
892// CHECK:     7: [B12.6] (BindTemporary)
893// CHECK:     8: [B12.7] (ImplicitCastExpr, NoOp, const class A)
894// CHECK:     9: [B12.8]
895// WARNINGS:     10: [B12.9] (CXXConstructExpr, class A)
896// ANALYZER:     10: [B12.9] (CXXConstructExpr, [B12.11], [B12.14], [B12.15], class A)
897// CHECK:    11: [B12.10] (BindTemporary)
898// CHECK:    12: A([B12.11]) (CXXFunctionalCastExpr, ConstructorConversion, class A)
899// CHECK:    13: [B12.12] (ImplicitCastExpr, NoOp, const class A)
900// CHECK:    14: [B12.13]
901// WARNINGS:    15: [B12.14] (CXXConstructExpr, class A)
902// ANALYZER:    15: [B12.14] (CXXConstructExpr, [B10.3], class A)
903// CHECK:    16: [B12.15] (BindTemporary)
904// CHECK:     Preds (1): B13
905// CHECK:     Succs (1): B10
906// CHECK:   [B13]
907// WARNINGS:     1: B() (CXXConstructExpr, class B)
908// ANALYZER:     1: B() (CXXConstructExpr, [B13.2], [B13.3], class B)
909// CHECK:     2: [B13.1] (BindTemporary)
910// CHECK:     3: [B13.2]
911// CHECK:     4: [B13.3].operator bool
912// CHECK:     5: [B13.3]
913// CHECK:     6: [B13.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
914// CHECK:     T: [B13.6] ? ... : ...
915// CHECK:     Preds (1): B14
916// CHECK:     Succs (2): B11 B12
917// CHECK:   [B0 (EXIT)]
918// CHECK:     Preds (1): B1
919// CHECK:   [B8 (ENTRY)]
920// CHECK:     Succs (1): B7
921// CHECK:   [B1]
922// CHECK:     1: int b;
923// CHECK:     2: [B4.5].~A() (Implicit destructor)
924// CHECK:     Preds (2): B2 B3
925// CHECK:     Succs (1): B0
926// CHECK:   [B2]
927// CHECK:     1: ~A() (Temporary object destructor)
928// CHECK:     Preds (1): B4
929// CHECK:     Succs (1): B1
930// CHECK:   [B3]
931// CHECK:     1: ~A() (Temporary object destructor)
932// CHECK:     2: ~A() (Temporary object destructor)
933// CHECK:     Preds (1): B4
934// CHECK:     Succs (1): B1
935// CHECK:   [B4]
936// CXX98:     1: [B7.2] ?: [B6.6]
937// CXX11:     1: [B7.3] ?: [B6.6]
938// CHECK:     2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
939// CHECK:     3: [B4.2]
940// WARNINGS:     4: [B4.3] (CXXConstructExpr, class A)
941// ANALYZER:     4: [B4.3] (CXXConstructExpr, [B4.5], class A)
942// CHECK:     5: A a = A() ?: A();
943// CHECK:     T: (Temp Dtor) [B6.2]
944// CHECK:     Preds (2): B5 B6
945// CHECK:     Succs (2): B3 B2
946// CHECK:   [B5]
947// CXX98:     1: [B7.2] (ImplicitCastExpr, NoOp, const class A)
948// CXX98:     2: [B5.1]
949// WARNINGS-CXX98:     3: [B5.2] (CXXConstructExpr, class A)
950// ANALYZER-CXX98:     3: [B5.2] (CXXConstructExpr, [B5.4], class A)
951// CXX98:     4: [B5.3] (BindTemporary)
952// CXX11:     1: [B7.3] (ImplicitCastExpr, NoOp, const class A)
953// WARNINGS-CXX11:     2: [B5.1] (CXXConstructExpr, class A)
954// ANALYZER-CXX11:     2: [B5.1] (CXXConstructExpr, [B5.3], class A)
955// CXX11:     3: [B5.2] (BindTemporary)
956// CHECK:     Preds (1): B7
957// CHECK:     Succs (1): B4
958// CHECK:   [B6]
959// WARNINGS:     1: A() (CXXConstructExpr, class A)
960// ANALYZER:     1: A() (CXXConstructExpr, [B6.2], [B6.4], [B6.5], class A)
961// CHECK:     2: [B6.1] (BindTemporary)
962// CHECK:     3: [B6.2] (ImplicitCastExpr, NoOp, const class A)
963// CHECK:     4: [B6.3]
964// WARNINGS:     5: [B6.4] (CXXConstructExpr, class A)
965// ANALYZER:     5: [B6.4] (CXXConstructExpr, [B6.6], class A)
966// CHECK:     6: [B6.5] (BindTemporary)
967// CHECK:     Preds (1): B7
968// CHECK:     Succs (1): B4
969// CHECK:   [B7]
970// WARNINGS:     1: A() (CXXConstructExpr, class A)
971// ANALYZER-CXX98:     1: A() (CXXConstructExpr, [B7.2], [B7.3], class A)
972// ANALYZER-CXX11:     1: A() (CXXConstructExpr, [B7.2], class A)
973// CHECK:     2: [B7.1] (BindTemporary)
974// CHECK:     3: [B7.2]
975// CHECK:     4: [B7.3].operator bool
976// CHECK:     5: [B7.3]
977// CHECK:     6: [B7.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
978// CHECK:     T: [B7.6] ? ... : ...
979// CHECK:     Preds (1): B8
980// CHECK:     Succs (2): B5 B6
981// CHECK:   [B0 (EXIT)]
982// CHECK:     Preds (1): B1
983// CHECK:   [B13 (ENTRY)]
984// CHECK:     Succs (1): B12
985// CHECK:   [B1]
986// CHECK:     1: int b;
987// CHECK:     2: [B9.4].~A() (Implicit destructor)
988// CHECK:     Preds (2): B2 B3
989// CHECK:     Succs (1): B0
990// CHECK:   [B2]
991// CHECK:     1: ~A() (Temporary object destructor)
992// CHECK:     Preds (1): B4
993// CHECK:     Succs (1): B1
994// CHECK:   [B3]
995// CHECK:     1: ~A() (Temporary object destructor)
996// CHECK:     2: ~A() (Temporary object destructor)
997// CHECK:     Preds (1): B4
998// CHECK:     Succs (1): B1
999// CHECK:   [B4]
1000// CXX98:     1: [B7.4] ?: [B6.6]
1001// CXX11:     1: [B7.5] ?: [B6.6]
1002// CHECK:     2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
1003// CHECK:     3: [B4.2]
1004// CHECK:     4: [B7.2]([B4.3])
1005// CHECK:     T: (Temp Dtor) [B6.2]
1006// CHECK:     Preds (2): B5 B6
1007// CHECK:     Succs (2): B3 B2
1008// CHECK:   [B5]
1009// CXX98:     1: [B7.4] (ImplicitCastExpr, NoOp, const class A)
1010// CXX98:     2: [B5.1]
1011// WARNINGS-CXX98:     3: [B5.2] (CXXConstructExpr, class A)
1012// ANALYZER-CXX98:     3: [B5.2] (CXXConstructExpr, [B5.4], class A)
1013// CXX98:     4: [B5.3] (BindTemporary)
1014// CXX11:     1: [B7.5] (ImplicitCastExpr, NoOp, const class A)
1015// WARNINGS-CXX11:     2: [B5.1] (CXXConstructExpr, class A)
1016// ANALYZER-CXX11:     2: [B5.1] (CXXConstructExpr, [B5.3], class A)
1017// CXX11:     3: [B5.2] (BindTemporary)
1018// CHECK:     Preds (1): B7
1019// CHECK:     Succs (1): B4
1020// CHECK:   [B6]
1021// WARNINGS:     1: A() (CXXConstructExpr, class A)
1022// ANALYZER:     1: A() (CXXConstructExpr, [B6.2], [B6.4], [B6.5], class A)
1023// CHECK:     2: [B6.1] (BindTemporary)
1024// CHECK:     3: [B6.2] (ImplicitCastExpr, NoOp, const class A)
1025// CHECK:     4: [B6.3]
1026// WARNINGS:     5: [B6.4] (CXXConstructExpr, class A)
1027// ANALYZER:     5: [B6.4] (CXXConstructExpr, [B6.6], class A)
1028// CHECK:     6: [B6.5] (BindTemporary)
1029// CHECK:     Preds (1): B7
1030// CHECK:     Succs (1): B4
1031// CHECK:   [B7]
1032// CHECK:     1: foo
1033// CHECK:     2: [B7.1] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &))
1034// WARNINGS:     3: A() (CXXConstructExpr, class A)
1035// ANALYZER-CXX98:     3: A() (CXXConstructExpr, [B7.4], class A)
1036// ANALYZER-CXX11:     3: A() (CXXConstructExpr, class A)
1037// CHECK:     4: [B7.3] (BindTemporary)
1038// CHECK:     5: [B7.4]
1039// CHECK:     6: [B7.5].operator bool
1040// CHECK:     7: [B7.5]
1041// CHECK:     8: [B7.7] (ImplicitCastExpr, UserDefinedConversion, _Bool)
1042// CHECK:     T: [B7.8] ? ... : ...
1043// CHECK:     Preds (2): B8 B9
1044// CHECK:     Succs (2): B5 B6
1045// CHECK:   [B8]
1046// CHECK:     1: ~A() (Temporary object destructor)
1047// CHECK:     Preds (1): B9
1048// CHECK:     Succs (1): B7
1049// CHECK:   [B9]
1050// CXX98:     1: [B12.2] ?: [B11.6]
1051// CXX11:     1: [B12.3] ?: [B11.6]
1052// CHECK:     2: [B9.1] (ImplicitCastExpr, NoOp, const class A)
1053// CHECK:     3: [B9.2]
1054// CHECK:     4: const A &a = A() ?: A();
1055// CHECK:     T: (Temp Dtor) [B11.2]
1056// CHECK:     Preds (2): B10 B11
1057// CHECK:     Succs (2): B8 B7
1058// CHECK:   [B10]
1059// CXX98:     1: [B12.2] (ImplicitCastExpr, NoOp, const class A)
1060// CXX98:     2: [B10.1]
1061// WARNINGS-CXX98:     3: [B10.2] (CXXConstructExpr, class A)
1062// ANALYZER-CXX98:     3: [B10.2] (CXXConstructExpr, [B10.4], class A)
1063// CXX98:     4: [B10.3] (BindTemporary)
1064// CXX11:     1: [B12.3] (ImplicitCastExpr, NoOp, const class A)
1065// WARNINGS-CXX11:     2: [B10.1] (CXXConstructExpr, class A)
1066// ANALYZER-CXX11:     2: [B10.1] (CXXConstructExpr, [B10.3], class A)
1067// CXX11:     3: [B10.2] (BindTemporary)
1068// CHECK:     Preds (1): B12
1069// CHECK:     Succs (1): B9
1070// CHECK:   [B11]
1071// WARNINGS-CHECK:     1: A() (CXXConstructExpr, class A)
1072// ANALYZER-CHECK:     1: A() (CXXConstructExpr, [B11.2], class A)
1073// CHECK:     2: [B11.1] (BindTemporary)
1074// CHECK:     3: [B11.2] (ImplicitCastExpr, NoOp, const class A)
1075// CHECK:     4: [B11.3]
1076// WARNINGS:     5: [B11.4] (CXXConstructExpr, class A)
1077// ANALYZER:     5: [B11.4] (CXXConstructExpr, [B11.6], class A)
1078// CHECK:     6: [B11.5] (BindTemporary)
1079// CHECK:     Preds (1): B12
1080// CHECK:     Succs (1): B9
1081// CHECK:   [B12]
1082// WARNINGS:     1: A() (CXXConstructExpr, class A)
1083// ANALYZER-CXX98:     1: A() (CXXConstructExpr, [B12.2], [B12.3], class A)
1084// ANALYZER-CXX11:     1: A() (CXXConstructExpr, [B12.2], class A)
1085// CHECK:     2: [B12.1] (BindTemporary)
1086// CHECK:     3: [B12.2]
1087// CHECK:     4: [B12.3].operator bool
1088// CHECK:     5: [B12.3]
1089// CHECK:     6: [B12.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
1090// CHECK:     T: [B12.6] ? ... : ...
1091// CHECK:     Preds (1): B13
1092// CHECK:     Succs (2): B10 B11
1093// CHECK:   [B0 (EXIT)]
1094// CHECK:     Preds (1): B1
1095// CHECK:   [B2 (ENTRY)]
1096// CHECK:     Succs (1): B1
1097// CHECK:   [B1]
1098// WARNINGS:     1: A() (CXXConstructExpr, class A)
1099// ANALYZER:     1: A() (CXXConstructExpr, [B1.2], [B1.4], [B1.5], class A)
1100// CHECK:     2: [B1.1] (BindTemporary)
1101// CHECK:     3: [B1.2] (ImplicitCastExpr, NoOp, const class A)
1102// CHECK:     4: [B1.3]
1103// WARNINGS:     5: [B1.4] (CXXConstructExpr, class A)
1104// ANALYZER:     5: [B1.4] (CXXConstructExpr, [B1.6], class A)
1105// CHECK:     6: A a = A();
1106// CHECK:     7: ~A() (Temporary object destructor)
1107// CHECK:     8: int b;
1108// CHECK:     9: [B1.6].~A() (Implicit destructor)
1109// CHECK:     Preds (1): B2
1110// CHECK:     Succs (1): B0
1111// CHECK:   [B0 (EXIT)]
1112// CHECK:     Preds (1): B1
1113// CHECK:   [B2 (ENTRY)]
1114// CHECK:     Succs (1): B1
1115// CHECK:   [B1]
1116// WARNINGS:     1: A() (CXXConstructExpr, class A)
1117// ANALYZER:     1: A() (CXXConstructExpr, [B1.4], class A)
1118// CHECK:     2: [B1.1] (BindTemporary)
1119// CHECK:     3: [B1.2] (ImplicitCastExpr, NoOp, const class A)
1120// CHECK:     4: [B1.3]
1121// CHECK:     5: const A &a = A();
1122// CHECK:     6: foo
1123// CHECK:     7: [B1.6] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &))
1124// WARNINGS:     8: A() (CXXConstructExpr, class A)
1125// ANALYZER:     8: A() (CXXConstructExpr, [B1.9], [B1.11], class A)
1126// CHECK:     9: [B1.8] (BindTemporary)
1127// CHECK:    10: [B1.9] (ImplicitCastExpr, NoOp, const class A)
1128// CHECK:    11: [B1.10]
1129// CHECK:    12: [B1.7]([B1.11])
1130// CHECK:    13: ~A() (Temporary object destructor)
1131// CHECK:    14: int b;
1132// CHECK:    15: [B1.5].~A() (Implicit destructor)
1133// CHECK:     Preds (1): B2
1134// CHECK:     Succs (1): B0
1135// CHECK:   [B0 (EXIT)]
1136// CHECK:     Preds (1): B1
1137// CHECK:   [B2 (ENTRY)]
1138// CHECK:     Succs (1): B1
1139// CHECK:   [B1]
1140// CHECK:     1: A::make
1141// CHECK:     2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class A (*)(void))
1142// WARNINGS:     3: [B1.2]()
1143// ANALYZER:     3: [B1.2]() (CXXRecordTypedCall, [B1.4], [B1.6], [B1.7])
1144// CHECK:     4: [B1.3] (BindTemporary)
1145// CHECK:     5: [B1.4] (ImplicitCastExpr, NoOp, const class A)
1146// CHECK:     6: [B1.5]
1147// WARNINGS:     7: [B1.6] (CXXConstructExpr, class A)
1148// ANALYZER:     7: [B1.6] (CXXConstructExpr, [B1.8], class A)
1149// CHECK:     8: A a = A::make();
1150// CHECK:     9: ~A() (Temporary object destructor)
1151// CHECK:    10: int b;
1152// CHECK:    11: [B1.8].~A() (Implicit destructor)
1153// CHECK:     Preds (1): B2
1154// CHECK:     Succs (1): B0
1155// CHECK:   [B0 (EXIT)]
1156// CHECK:     Preds (1): B1
1157// CHECK:   [B2 (ENTRY)]
1158// CHECK:     Succs (1): B1
1159// CHECK:   [B1]
1160// CHECK:     1: A::make
1161// CHECK:     2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class A (*)(void))
1162// WARNINGS:     3: [B1.2]()
1163// ANALYZER:     3: [B1.2]() (CXXRecordTypedCall, [B1.6])
1164// CHECK:     4: [B1.3] (BindTemporary)
1165// CHECK:     5: [B1.4] (ImplicitCastExpr, NoOp, const class A)
1166// CHECK:     6: [B1.5]
1167// CHECK:     7: const A &a = A::make();
1168// CHECK:     8: foo
1169// CHECK:     9: [B1.8] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &))
1170// CHECK:    10: A::make
1171// CHECK:    11: [B1.10] (ImplicitCastExpr, FunctionToPointerDecay, class A (*)(void))
1172// WARNINGS:    12: [B1.11]()
1173// ANALYZER:    12: [B1.11]() (CXXRecordTypedCall, [B1.13], [B1.15])
1174// CHECK:    13: [B1.12] (BindTemporary)
1175// CHECK:    14: [B1.13] (ImplicitCastExpr, NoOp, const class A)
1176// CHECK:    15: [B1.14]
1177// CHECK:    16: [B1.9]([B1.15])
1178// CHECK:    17: ~A() (Temporary object destructor)
1179// CHECK:    18: int b;
1180// CHECK:    19: [B1.7].~A() (Implicit destructor)
1181// CHECK:     Preds (1): B2
1182// CHECK:     Succs (1): B0
1183// CHECK:   [B0 (EXIT)]
1184// CHECK:     Preds (1): B1
1185// CHECK:   [B2 (ENTRY)]
1186// CHECK:     Succs (1): B1
1187// CHECK:   [B1]
1188// CHECK:     1: int a;
1189// WARNINGS:     2: A() (CXXConstructExpr, class A)
1190// ANALYZER:     2: A() (CXXConstructExpr, [B1.3], [B1.4], class A)
1191// CHECK:     3: [B1.2] (BindTemporary)
1192// CHECK:     4: [B1.3]
1193// CHECK:     5: [B1.4].operator int
1194// CHECK:     6: [B1.4]
1195// CHECK:     7: [B1.6] (ImplicitCastExpr, UserDefinedConversion, int)
1196// CHECK:     8: a
1197// CHECK:     9: [B1.8] = [B1.7]
1198// CHECK:    10: ~A() (Temporary object destructor)
1199// CHECK:    11: int b;
1200// CHECK:     Preds (1): B2
1201// CHECK:     Succs (1): B0
1202// CHECK:   [B0 (EXIT)]
1203// CHECK:     Preds (1): B1
1204// CHECK:   [B2 (ENTRY)]
1205// CHECK:     Succs (1): B1
1206// CHECK:   [B1]
1207// WARNINGS:     1: A() (CXXConstructExpr, class A)
1208// ANALYZER:     1: A() (CXXConstructExpr, [B1.2], [B1.3], class A)
1209// CHECK:     2: [B1.1] (BindTemporary)
1210// CHECK:     3: [B1.2]
1211// CHECK:     4: [B1.3].operator int
1212// CHECK:     5: [B1.3]
1213// CHECK:     6: [B1.5] (ImplicitCastExpr, UserDefinedConversion, int)
1214// CHECK:     7: int([B1.6]) (CXXFunctionalCastExpr, NoOp, int)
1215// WARNINGS:     8: B() (CXXConstructExpr, class B)
1216// ANALYZER:     8: B() (CXXConstructExpr, [B1.9], [B1.10], class B)
1217// CHECK:     9: [B1.8] (BindTemporary)
1218// CHECK:    10: [B1.9]
1219// CHECK:    11: [B1.10].operator int
1220// CHECK:    12: [B1.10]
1221// CHECK:    13: [B1.12] (ImplicitCastExpr, UserDefinedConversion, int)
1222// CHECK:    14: int([B1.13]) (CXXFunctionalCastExpr, NoOp, int)
1223// CHECK:    15: [B1.7] + [B1.14]
1224// CHECK:    16: a([B1.15]) (Member initializer)
1225// CHECK:    17: ~B() (Temporary object destructor)
1226// CHECK:    18: ~A() (Temporary object destructor)
1227// CHECK:    19: /*implicit*/(int)0
1228// CHECK:    20: b([B1.19]) (Member initializer)
1229// CHECK:     Preds (1): B2
1230// CHECK:     Succs (1): B0
1231// CHECK:   [B0 (EXIT)]
1232// CHECK:     Preds (1): B1
1233// CHECK:   [B3 (ENTRY)]
1234// CHECK:     Succs (1): B2
1235// CHECK:   [B1]
1236// CHECK:     1: int b;
1237// CHECK:     Preds (1): B2(Unreachable)
1238// CHECK:     Succs (1): B0
1239// CHECK:   [B2 (NORETURN)]
1240// CHECK:     1: int a;
1241// WARNINGS:     2: NoReturn() (CXXConstructExpr, class NoReturn)
1242// ANALYZER-CXX98:     2: NoReturn() (CXXConstructExpr, [B2.3], [B2.4], class NoReturn)
1243// ANALYZER-CXX11:     2: NoReturn() (CXXConstructExpr, [B2.3], class NoReturn)
1244// CHECK:     3: [B2.2] (BindTemporary)
1245// CHECK:     [[MEMBER:[45]]]: [B2.{{[34]}}].f
1246// CHECK:     {{[56]}}: [B2.[[MEMBER]]]()
1247// CHECK:     {{[67]}}: ~NoReturn() (Temporary object destructor)
1248// CHECK:     Preds (1): B3
1249// CHECK:     Succs (1): B0
1250// CHECK:   [B0 (EXIT)]
1251// CHECK:     Preds (2): B1 B2
1252// CHECK:   [B3 (ENTRY)]
1253// CHECK:     Succs (1): B2
1254// CHECK:   [B1]
1255// CHECK:     1: int b;
1256// CHECK:     Preds (1): B2(Unreachable)
1257// CHECK:     Succs (1): B0
1258// CHECK:   [B2 (NORETURN)]
1259// CHECK:     1: int a;
1260// WARNINGS:     2: NoReturn() (CXXConstructExpr, class NoReturn)
1261// ANALYZER:     2: NoReturn() (CXXConstructExpr, [B2.3], class NoReturn)
1262// CHECK:     3: [B2.2] (BindTemporary)
1263// CHECK:     4: 47
1264// CHECK:     5: ... , [B2.4]
1265// CHECK:     6: ~NoReturn() (Temporary object destructor)
1266// CHECK:     Preds (1): B3
1267// CHECK:     Succs (1): B0
1268// CHECK:   [B0 (EXIT)]
1269// CHECK:     Preds (2): B1 B2
1270// CHECK:   [B9 (ENTRY)]
1271// CHECK:     Succs (1): B8
1272// CHECK:   [B1]
1273// CHECK:     1: 0
1274// CHECK:     2: return [B1.1];
1275// CHECK:     Preds (2): B3 B8
1276// CHECK:     Succs (1): B0
1277// CHECK:   [B2]
1278// CHECK:     1: 1
1279// CHECK:     2: return [B2.1];
1280// CHECK:     Preds (1): B3
1281// CHECK:     Succs (1): B0
1282// CHECK:   [B3]
1283// CHECK:     T: if [B5.1]
1284// CHECK:     Preds (2): B4(Unreachable) B5
1285// CHECK:     Succs (2): B2 B1
1286// CHECK:   [B4 (NORETURN)]
1287// CHECK:     1: ~NoReturn() (Temporary object destructor)
1288// CHECK:     Preds (1): B5
1289// CHECK:     Succs (1): B0
1290// CHECK:   [B5]
1291// CHECK:     1: [B7.3] || [B6.7]
1292// CHECK:     T: (Temp Dtor) [B6.4]
1293// CHECK:     Preds (2): B6 B7
1294// CHECK:     Succs (2): B4 B3
1295// CHECK:   [B6]
1296// CHECK:     1: check
1297// CHECK:     2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
1298// WARNINGS:     3: NoReturn() (CXXConstructExpr, class NoReturn)
1299// ANALYZER:     3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn)
1300// CHECK:     4: [B6.3] (BindTemporary)
1301// CHECK:     5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
1302// CHECK:     6: [B6.5]
1303// CHECK:     7: [B6.2]([B6.6])
1304// CHECK:     Preds (1): B7
1305// CHECK:     Succs (1): B5
1306// CHECK:   [B7]
1307// CHECK:     1: value
1308// CHECK:     2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1309// CHECK:     3: ![B7.2]
1310// CHECK:     T: [B7.3] || ...
1311// CHECK:     Preds (1): B8
1312// CHECK:     Succs (2): B5 B6
1313// CHECK:   [B8]
1314// CHECK:     1: value
1315// CHECK:     2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1316// CHECK:     T: if [B8.2]
1317// CHECK:     Preds (1): B9
1318// CHECK:     Succs (2): B7 B1
1319// CHECK:   [B0 (EXIT)]
1320// CHECK:     Preds (3): B1 B2 B4
1321// CHECK:   [B10 (ENTRY)]
1322// CHECK:     Succs (1): B9
1323// CHECK:   [B1]
1324// CHECK:     1: 0
1325// CHECK:     2: return [B1.1];
1326// CHECK:     Preds (2): B3 B9
1327// CHECK:     Succs (1): B0
1328// CHECK:   [B2]
1329// CHECK:     1: 1
1330// CHECK:     2: return [B2.1];
1331// CHECK:     Preds (1): B3
1332// CHECK:     Succs (1): B0
1333// CHECK:   [B3]
1334// CHECK:     T: if [B5.1]
1335// CHECK:     Preds (2): B4(Unreachable) B5
1336// CHECK:     Succs (2): B2 B1
1337// CHECK:   [B4 (NORETURN)]
1338// CHECK:     1: ~NoReturn() (Temporary object destructor)
1339// CHECK:     Preds (1): B5
1340// CHECK:     Succs (1): B0
1341// CHECK:   [B5]
1342// CHECK:     1: [B8.3] || [B7.3] || [B6.7]
1343// CHECK:     T: (Temp Dtor) [B6.4]
1344// CHECK:     Preds (3): B6 B7 B8
1345// CHECK:     Succs (2): B4 B3
1346// CHECK:   [B6]
1347// CHECK:     1: check
1348// CHECK:     2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
1349// WARNINGS:     3: NoReturn() (CXXConstructExpr, class NoReturn)
1350// ANALYZER:     3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn)
1351// CHECK:     4: [B6.3] (BindTemporary)
1352// CHECK:     5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
1353// CHECK:     6: [B6.5]
1354// CHECK:     7: [B6.2]([B6.6])
1355// CHECK:     Preds (1): B7
1356// CHECK:     Succs (1): B5
1357// CHECK:   [B7]
1358// CHECK:     1: value
1359// CHECK:     2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1360// CHECK:     3: ![B7.2]
1361// CHECK:     T: [B8.3] || [B7.3] || ...
1362// CHECK:     Preds (1): B8
1363// CHECK:     Succs (2): B5 B6
1364// CHECK:   [B8]
1365// CHECK:     1: value
1366// CHECK:     2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1367// CHECK:     3: ![B8.2]
1368// CHECK:     T: [B8.3] || ...
1369// CHECK:     Preds (1): B9
1370// CHECK:     Succs (2): B5 B7
1371// CHECK:   [B9]
1372// CHECK:     1: value
1373// CHECK:     2: [B9.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1374// CHECK:     T: if [B9.2]
1375// CHECK:     Preds (1): B10
1376// CHECK:     Succs (2): B8 B1
1377// CHECK:   [B0 (EXIT)]
1378// CHECK:     Preds (3): B1 B2 B4
1379// CHECK:   [B10 (ENTRY)]
1380// CHECK:     Succs (1): B9
1381// CHECK:   [B1]
1382// CHECK:     1: 0
1383// CHECK:     2: return [B1.1];
1384// CHECK:     Preds (2): B3 B9
1385// CHECK:     Succs (1): B0
1386// CHECK:   [B2]
1387// CHECK:     1: 1
1388// CHECK:     2: return [B2.1];
1389// CHECK:     Preds (1): B3
1390// CHECK:     Succs (1): B0
1391// CHECK:   [B3]
1392// CHECK:     T: if [B5.1]
1393// CHECK:     Preds (2): B4(Unreachable) B5
1394// CHECK:     Succs (2): B2 B1
1395// CHECK:   [B4 (NORETURN)]
1396// CHECK:     1: ~NoReturn() (Temporary object destructor)
1397// CHECK:     Preds (1): B5
1398// CHECK:     Succs (1): B0
1399// CHECK:   [B5]
1400// CHECK:     1: [B8.3] || [B7.2] || [B6.7]
1401// CHECK:     T: (Temp Dtor) [B6.4]
1402// CHECK:     Preds (3): B6 B7 B8
1403// CHECK:     Succs (2): B4 B3
1404// CHECK:   [B6]
1405// CHECK:     1: check
1406// CHECK:     2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
1407// WARNINGS:     3: NoReturn() (CXXConstructExpr, class NoReturn)
1408// ANALYZER:     3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn)
1409// CHECK:     4: [B6.3] (BindTemporary)
1410// CHECK:     5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
1411// CHECK:     6: [B6.5]
1412// CHECK:     7: [B6.2]([B6.6])
1413// CHECK:     Preds (1): B7
1414// CHECK:     Succs (1): B5
1415// CHECK:   [B7]
1416// CHECK:     1: value
1417// CHECK:     2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1418// CHECK:     T: [B8.3] || [B7.2] || ...
1419// CHECK:     Preds (1): B8
1420// CHECK:     Succs (2): B5 B6
1421// CHECK:   [B8]
1422// CHECK:     1: value
1423// CHECK:     2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1424// CHECK:     3: ![B8.2]
1425// CHECK:     T: [B8.3] || ...
1426// CHECK:     Preds (1): B9
1427// CHECK:     Succs (2): B5 B7
1428// CHECK:   [B9]
1429// CHECK:     1: value
1430// CHECK:     2: [B9.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1431// CHECK:     T: if [B9.2]
1432// CHECK:     Preds (1): B10
1433// CHECK:     Succs (2): B8 B1
1434// CHECK:   [B0 (EXIT)]
1435// CHECK:     Preds (3): B1 B2 B4
1436// CHECK:   [B1 (ENTRY)]
1437// CHECK:     Succs (1): B0
1438// CHECK:   [B0 (EXIT)]
1439// CHECK:     Preds (1): B1
1440// CHECK:   [B2 (ENTRY)]
1441// CHECK:     Succs (1): B1
1442// CHECK:   [B1]
1443// CHECK:     1: foo1
1444// CHECK:     2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, const class pass_references_through::C &(*)(void))
1445// CHECK:     3: [B1.2]()
1446// CHECK:     4: return [B1.3];
1447// CHECK:     Preds (1): B2
1448// CHECK:     Succs (1): B0
1449// CHECK:   [B0 (EXIT)]
1450// CHECK:     Preds (1): B1
1451// CHECK:   [B2 (ENTRY)]
1452// CHECK:     Succs (1): B1
1453// CHECK:   [B1]
1454// CHECK:     1: foo2
1455// CHECK:     2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class pass_references_through::C &&(*)(void))
1456// CHECK:     3: [B1.2]()
1457// CHECK:     4: return [B1.3];
1458// CHECK:     Preds (1): B2
1459// CHECK:     Succs (1): B0
1460// CHECK:   [B0 (EXIT)]
1461// CHECK:     Preds (1): B1
1462