From d74dd49065ba4109b8b04209fd197d85857d4281 Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sun, 12 Feb 2012 18:41:05 +0000 Subject: Proper initializer list support for new expressions and type construct expressions. Array new still missing. llvm-svn: 150346 --- clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp') diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index fe3cd8fc3a1..bfe3f7991ea 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -122,3 +122,8 @@ void auto_deduction() { for (int i : {1, 2, 3, 4}) {} } + +void dangle() { + new auto{1, 2, 3}; // expected-error {{cannot use list-initialization}} + new std::initializer_list{1, 2, 3}; // expected-warning {{at the end of the full-expression}} +} -- cgit v1.2.3