diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-02-12 18:41:05 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-02-12 18:41:05 +0000 |
commit | 6dc00f6e98a00bd1c332927c3e04918d7e8b0d4f (patch) | |
tree | 89c48828f1a3db02f895af002fea1b3202670def /test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | |
parent | 215e4e17d00e12c38687a95502506d8f2ca3e646 (diff) |
Proper initializer list support for new expressions and type construct expressions. Array new still missing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index fe3cd8fc3a..bfe3f7991e 100644 --- a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/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<int>{1, 2, 3}; // expected-warning {{at the end of the full-expression}} +} |