diff options
Diffstat (limited to 'test/Analysis/dtor-cxx11.cpp')
-rw-r--r-- | test/Analysis/dtor-cxx11.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Analysis/dtor-cxx11.cpp b/test/Analysis/dtor-cxx11.cpp new file mode 100644 index 000000000000..7d2e87e44e4b --- /dev/null +++ b/test/Analysis/dtor-cxx11.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true -Wno-null-dereference -verify %s +// expected-no-diagnostics + +#include "Inputs/system-header-simulator-cxx.h" + +namespace Cxx11BraceInit { + struct Foo { + ~Foo() {} + }; + + void testInitializerList() { + for (Foo foo : {Foo(), Foo()}) {} + } +} + |