[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / temp-obj-dtors-cfg-output.cpp
blob5b16915ae6f680518d6d2950d5f01ab6c48125a0
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
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.
20 // Additionally, different C++ standards are checked.
22 class A {
23 public:
24 A() {}
25 ~A() {}
27 static A make() { return A(); }
29 operator bool() { return false; }
30 operator int() { return 0; }
33 class B {
34 public:
35 B() {}
36 ~B() {}
38 operator bool() { return true; }
39 operator int() { return 1; }
40 operator A() { return A(); }
43 void foo(int);
44 void foo(bool);
45 void foo(const A&);
47 void test_binary() {
48 int a = int(A()) + int(B());
49 foo(int(A()) + int(B()));
50 int b;
53 void test_and() {
54 bool a = A() && B();
55 foo(A() && B());
56 int b;
59 void test_or() {
60 bool a = A() || B();
61 foo(A() || B());
62 int b;
65 void test_cond() {
66 A a = B() ? A() : A(B());
67 if (B()) { foo(0); } else { foo(0); }
68 int b;
71 struct C {
72 C():b_(true) {}
73 ~C() {}
75 operator bool() { return b_; }
76 bool b_;
79 struct D {
80 D():b_(true) {}
82 operator bool() { return b_; }
83 bool b_;
86 int test_cond_unnamed_custom_destructor() {
87 if (C()) { return 1; } else { return 0; }
90 int test_cond_named_custom_destructor() {
91 if (C c = C()) { return 1; } else { return 0; }
94 int test_cond_unnamed_auto_destructor() {
95 if (D()) { return 1; } else { return 0; }
98 int test_cond_named_auto_destructor() {
99 if (D d = D()) { return 1; } else { return 0; }
102 void test_cond_cref() {
103 const A& a = B() ? A() : A(B());
104 foo(B() ? A() : A(B()));
105 int b;
108 void test_cond_implicit() {
109 A a = A() ?: A();
110 int b;
113 void test_cond_implicit_cref() {
114 const A& a = A() ?: A();
115 foo(A() ?: A());
116 int b;
119 void test_copy_init() {
120 A a = A();
121 int b;
124 void test_cref_init() {
125 const A& a = A();
126 foo(A());
127 int b;
130 void test_call_copy_init() {
131 A a = A::make();
132 int b;
135 void test_call_cref_init() {
136 const A& a = A::make();
137 foo(A::make());
138 int b;
141 void test_assign() {
142 int a;
143 a = A();
144 int b;
147 class TestCtorInits {
148 int a;
149 int b;
150 public:
151 TestCtorInits();
154 TestCtorInits::TestCtorInits()
155 : a(int(A()) + int(B()))
156 , b() {}
158 class NoReturn {
159 public:
160 ~NoReturn() __attribute__((noreturn));
161 void f();
164 void test_noreturn1() {
165 int a;
166 NoReturn().f();
167 int b;
170 void test_noreturn2() {
171 int a;
172 NoReturn(), 47;
173 int b;
176 extern bool check(const NoReturn&);
178 // PR16664 and PR18159
179 int testConsistencyNestedSimple(bool value) {
180 if (value) {
181 if (!value || check(NoReturn())) {
182 return 1;
185 return 0;
188 // PR16664 and PR18159
189 int testConsistencyNestedComplex(bool value) {
190 if (value) {
191 if (!value || !value || check(NoReturn())) {
192 return 1;
195 return 0;
198 // PR16664 and PR18159
199 int testConsistencyNestedNormalReturn(bool value) {
200 if (value) {
201 if (!value || value || check(NoReturn())) {
202 return 1;
205 return 0;
208 namespace pass_references_through {
209 class C {
210 public:
211 ~C() {}
214 const C &foo1();
215 C &&foo2();
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.
219 const C &bar1() { return foo1(); } // no-crash
220 C &&bar2() { return foo2(); } // no-crash
221 const C &bar3(bool coin) {
222 return coin ? foo1() : foo1(); // no-crash
224 } // end namespace pass_references_through
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: b(/*implicit*/(int)0) (Member initializer)
1228 // CHECK: Preds (1): B2
1229 // CHECK: Succs (1): B0
1230 // CHECK: [B0 (EXIT)]
1231 // CHECK: Preds (1): B1
1232 // CHECK: [B3 (ENTRY)]
1233 // CHECK: Succs (1): B2
1234 // CHECK: [B1]
1235 // CHECK: 1: int b;
1236 // CHECK: Preds (1): B2(Unreachable)
1237 // CHECK: Succs (1): B0
1238 // CHECK: [B2 (NORETURN)]
1239 // CHECK: 1: int a;
1240 // WARNINGS: 2: NoReturn() (CXXConstructExpr, class NoReturn)
1241 // ANALYZER-CXX98: 2: NoReturn() (CXXConstructExpr, [B2.3], [B2.4], class NoReturn)
1242 // ANALYZER-CXX11: 2: NoReturn() (CXXConstructExpr, [B2.3], class NoReturn)
1243 // CHECK: 3: [B2.2] (BindTemporary)
1244 // CHECK: [[MEMBER:[45]]]: [B2.{{[34]}}].f
1245 // CHECK: {{[56]}}: [B2.[[MEMBER]]]()
1246 // CHECK: {{[67]}}: ~NoReturn() (Temporary object destructor)
1247 // CHECK: Preds (1): B3
1248 // CHECK: Succs (1): B0
1249 // CHECK: [B0 (EXIT)]
1250 // CHECK: Preds (2): B1 B2
1251 // CHECK: [B3 (ENTRY)]
1252 // CHECK: Succs (1): B2
1253 // CHECK: [B1]
1254 // CHECK: 1: int b;
1255 // CHECK: Preds (1): B2(Unreachable)
1256 // CHECK: Succs (1): B0
1257 // CHECK: [B2 (NORETURN)]
1258 // CHECK: 1: int a;
1259 // WARNINGS: 2: NoReturn() (CXXConstructExpr, class NoReturn)
1260 // ANALYZER: 2: NoReturn() (CXXConstructExpr, [B2.3], class NoReturn)
1261 // CHECK: 3: [B2.2] (BindTemporary)
1262 // CHECK: 4: 47
1263 // CHECK: 5: ... , [B2.4]
1264 // CHECK: 6: ~NoReturn() (Temporary object destructor)
1265 // CHECK: Preds (1): B3
1266 // CHECK: Succs (1): B0
1267 // CHECK: [B0 (EXIT)]
1268 // CHECK: Preds (2): B1 B2
1269 // CHECK: [B9 (ENTRY)]
1270 // CHECK: Succs (1): B8
1271 // CHECK: [B1]
1272 // CHECK: 1: 0
1273 // CHECK: 2: return [B1.1];
1274 // CHECK: Preds (2): B3 B8
1275 // CHECK: Succs (1): B0
1276 // CHECK: [B2]
1277 // CHECK: 1: 1
1278 // CHECK: 2: return [B2.1];
1279 // CHECK: Preds (1): B3
1280 // CHECK: Succs (1): B0
1281 // CHECK: [B3]
1282 // CHECK: T: if [B5.1]
1283 // CHECK: Preds (2): B4(Unreachable) B5
1284 // CHECK: Succs (2): B2 B1
1285 // CHECK: [B4 (NORETURN)]
1286 // CHECK: 1: ~NoReturn() (Temporary object destructor)
1287 // CHECK: Preds (1): B5
1288 // CHECK: Succs (1): B0
1289 // CHECK: [B5]
1290 // CHECK: 1: [B7.3] || [B6.7]
1291 // CHECK: T: (Temp Dtor) [B6.4]
1292 // CHECK: Preds (2): B6 B7
1293 // CHECK: Succs (2): B4 B3
1294 // CHECK: [B6]
1295 // CHECK: 1: check
1296 // CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
1297 // WARNINGS: 3: NoReturn() (CXXConstructExpr, class NoReturn)
1298 // ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn)
1299 // CHECK: 4: [B6.3] (BindTemporary)
1300 // CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
1301 // CHECK: 6: [B6.5]
1302 // CHECK: 7: [B6.2]([B6.6])
1303 // CHECK: Preds (1): B7
1304 // CHECK: Succs (1): B5
1305 // CHECK: [B7]
1306 // CHECK: 1: value
1307 // CHECK: 2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1308 // CHECK: 3: ![B7.2]
1309 // CHECK: T: [B7.3] || ...
1310 // CHECK: Preds (1): B8
1311 // CHECK: Succs (2): B5 B6
1312 // CHECK: [B8]
1313 // CHECK: 1: value
1314 // CHECK: 2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1315 // CHECK: T: if [B8.2]
1316 // CHECK: Preds (1): B9
1317 // CHECK: Succs (2): B7 B1
1318 // CHECK: [B0 (EXIT)]
1319 // CHECK: Preds (3): B1 B2 B4
1320 // CHECK: [B10 (ENTRY)]
1321 // CHECK: Succs (1): B9
1322 // CHECK: [B1]
1323 // CHECK: 1: 0
1324 // CHECK: 2: return [B1.1];
1325 // CHECK: Preds (2): B3 B9
1326 // CHECK: Succs (1): B0
1327 // CHECK: [B2]
1328 // CHECK: 1: 1
1329 // CHECK: 2: return [B2.1];
1330 // CHECK: Preds (1): B3
1331 // CHECK: Succs (1): B0
1332 // CHECK: [B3]
1333 // CHECK: T: if [B5.1]
1334 // CHECK: Preds (2): B4(Unreachable) B5
1335 // CHECK: Succs (2): B2 B1
1336 // CHECK: [B4 (NORETURN)]
1337 // CHECK: 1: ~NoReturn() (Temporary object destructor)
1338 // CHECK: Preds (1): B5
1339 // CHECK: Succs (1): B0
1340 // CHECK: [B5]
1341 // CHECK: 1: [B8.3] || [B7.3] || [B6.7]
1342 // CHECK: T: (Temp Dtor) [B6.4]
1343 // CHECK: Preds (3): B6 B7 B8
1344 // CHECK: Succs (2): B4 B3
1345 // CHECK: [B6]
1346 // CHECK: 1: check
1347 // CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
1348 // WARNINGS: 3: NoReturn() (CXXConstructExpr, class NoReturn)
1349 // ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn)
1350 // CHECK: 4: [B6.3] (BindTemporary)
1351 // CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
1352 // CHECK: 6: [B6.5]
1353 // CHECK: 7: [B6.2]([B6.6])
1354 // CHECK: Preds (1): B7
1355 // CHECK: Succs (1): B5
1356 // CHECK: [B7]
1357 // CHECK: 1: value
1358 // CHECK: 2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1359 // CHECK: 3: ![B7.2]
1360 // CHECK: T: [B8.3] || [B7.3] || ...
1361 // CHECK: Preds (1): B8
1362 // CHECK: Succs (2): B5 B6
1363 // CHECK: [B8]
1364 // CHECK: 1: value
1365 // CHECK: 2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1366 // CHECK: 3: ![B8.2]
1367 // CHECK: T: [B8.3] || ...
1368 // CHECK: Preds (1): B9
1369 // CHECK: Succs (2): B5 B7
1370 // CHECK: [B9]
1371 // CHECK: 1: value
1372 // CHECK: 2: [B9.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1373 // CHECK: T: if [B9.2]
1374 // CHECK: Preds (1): B10
1375 // CHECK: Succs (2): B8 B1
1376 // CHECK: [B0 (EXIT)]
1377 // CHECK: Preds (3): B1 B2 B4
1378 // CHECK: [B10 (ENTRY)]
1379 // CHECK: Succs (1): B9
1380 // CHECK: [B1]
1381 // CHECK: 1: 0
1382 // CHECK: 2: return [B1.1];
1383 // CHECK: Preds (2): B3 B9
1384 // CHECK: Succs (1): B0
1385 // CHECK: [B2]
1386 // CHECK: 1: 1
1387 // CHECK: 2: return [B2.1];
1388 // CHECK: Preds (1): B3
1389 // CHECK: Succs (1): B0
1390 // CHECK: [B3]
1391 // CHECK: T: if [B5.1]
1392 // CHECK: Preds (2): B4(Unreachable) B5
1393 // CHECK: Succs (2): B2 B1
1394 // CHECK: [B4 (NORETURN)]
1395 // CHECK: 1: ~NoReturn() (Temporary object destructor)
1396 // CHECK: Preds (1): B5
1397 // CHECK: Succs (1): B0
1398 // CHECK: [B5]
1399 // CHECK: 1: [B8.3] || [B7.2] || [B6.7]
1400 // CHECK: T: (Temp Dtor) [B6.4]
1401 // CHECK: Preds (3): B6 B7 B8
1402 // CHECK: Succs (2): B4 B3
1403 // CHECK: [B6]
1404 // CHECK: 1: check
1405 // CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
1406 // WARNINGS: 3: NoReturn() (CXXConstructExpr, class NoReturn)
1407 // ANALYZER: 3: NoReturn() (CXXConstructExpr, [B6.4], [B6.6], class NoReturn)
1408 // CHECK: 4: [B6.3] (BindTemporary)
1409 // CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
1410 // CHECK: 6: [B6.5]
1411 // CHECK: 7: [B6.2]([B6.6])
1412 // CHECK: Preds (1): B7
1413 // CHECK: Succs (1): B5
1414 // CHECK: [B7]
1415 // CHECK: 1: value
1416 // CHECK: 2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1417 // CHECK: T: [B8.3] || [B7.2] || ...
1418 // CHECK: Preds (1): B8
1419 // CHECK: Succs (2): B5 B6
1420 // CHECK: [B8]
1421 // CHECK: 1: value
1422 // CHECK: 2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1423 // CHECK: 3: ![B8.2]
1424 // CHECK: T: [B8.3] || ...
1425 // CHECK: Preds (1): B9
1426 // CHECK: Succs (2): B5 B7
1427 // CHECK: [B9]
1428 // CHECK: 1: value
1429 // CHECK: 2: [B9.1] (ImplicitCastExpr, LValueToRValue, _Bool)
1430 // CHECK: T: if [B9.2]
1431 // CHECK: Preds (1): B10
1432 // CHECK: Succs (2): B8 B1
1433 // CHECK: [B0 (EXIT)]
1434 // CHECK: Preds (3): B1 B2 B4
1435 // CHECK: [B1 (ENTRY)]
1436 // CHECK: Succs (1): B0
1437 // CHECK: [B0 (EXIT)]
1438 // CHECK: Preds (1): B1
1439 // CHECK: [B2 (ENTRY)]
1440 // CHECK: Succs (1): B1
1441 // CHECK: [B1]
1442 // CHECK: 1: foo1
1443 // CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, const class pass_references_through::C &(*)(void))
1444 // CHECK: 3: [B1.2]()
1445 // CHECK: 4: return [B1.3];
1446 // CHECK: Preds (1): B2
1447 // CHECK: Succs (1): B0
1448 // CHECK: [B0 (EXIT)]
1449 // CHECK: Preds (1): B1
1450 // CHECK: [B2 (ENTRY)]
1451 // CHECK: Succs (1): B1
1452 // CHECK: [B1]
1453 // CHECK: 1: foo2
1454 // CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, class pass_references_through::C &&(*)(void))
1455 // CHECK: 3: [B1.2]()
1456 // CHECK: 4: return [B1.3];
1457 // CHECK: Preds (1): B2
1458 // CHECK: Succs (1): B0
1459 // CHECK: [B0 (EXIT)]
1460 // CHECK: Preds (1): B1