Alexander Kornienko | a61d4c9 | 2018-05-04 14:13:14 +0000 | [diff] [blame] | 1 | // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -Wno-null-dereference -verify %s |
Jordan Rose | 398fb00 | 2014-04-01 16:39:33 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
| 3 | |
| 4 | #include "Inputs/system-header-simulator-cxx.h" |
| 5 | |
| 6 | namespace Cxx11BraceInit { |
| 7 | struct Foo { |
| 8 | ~Foo() {} |
| 9 | }; |
| 10 | |
Jordan Rose | 398fb00 | 2014-04-01 16:39:33 +0000 | [diff] [blame] | 11 | void testInitializerList() { |
| 12 | for (Foo foo : {Foo(), Foo()}) {} |
Jordan Rose | a78de33 | 2014-04-01 16:39:59 +0000 | [diff] [blame] | 13 | } |
Jordan Rose | 398fb00 | 2014-04-01 16:39:33 +0000 | [diff] [blame] | 14 | } |
Jordan Rose | a78de33 | 2014-04-01 16:39:59 +0000 | [diff] [blame] | 15 | |