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 | d74dd49065ba4109b8b04209fd197d85857d4281 (patch) | |
tree | d69627d08adff9adc4fcc5f27760933bc7782130 /clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp | |
parent | 1a22d2889b234fcb10cad83be231b113e6d3a8b3 (diff) | |
download | bcm5719-llvm-d74dd49065ba4109b8b04209fd197d85857d4281.tar.gz bcm5719-llvm-d74dd49065ba4109b8b04209fd197d85857d4281.zip |
Proper initializer list support for new expressions and type construct expressions. Array new still missing.
llvm-svn: 150346
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp index b716d81834f..e4551d98914 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp @@ -27,6 +27,13 @@ namespace aggregate { S s5{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} }; // expected-error {{cannot omit braces}} } + void bracing_new() { + new S{ {1, 2}, {3, 4}, { {5}, {6} }, { {7, 8} } }; // completely braced + new S{ 1, 2, 3, 4, 5, 6 }; // expected-error 5 {{cannot omit braces}} + new S{ {1, 2}, {3, 4}, {5, 6}, { {7, 8} } }; // expected-error 2 {{cannot omit braces}} + new S{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} }; // expected-error {{cannot omit braces}} + } + struct String { String(const char*); }; |