diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-02-13 19:55:43 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-02-13 19:55:43 +0000 |
commit | 2b80af4949485caf8f67a8c6d52f0762c6de8fde (patch) | |
tree | c05c6f0a704b00e3e28bf0a8cbc31ff5a472e0f6 /clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp | |
parent | f2ee0679aaf6b02ed19ce951dd6571d6046741bb (diff) | |
download | bcm5719-llvm-2b80af4949485caf8f67a8c6d52f0762c6de8fde.tar.gz bcm5719-llvm-2b80af4949485caf8f67a8c6d52f0762c6de8fde.zip |
Don't route explicit construction via list-initialization through the functional cast code path. It sometimes does the wrong thing, produces horrible error messages, and is just unnecessary.
llvm-svn: 150408
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 e4551d98914..4ee3cd3f6bf 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp @@ -34,6 +34,13 @@ namespace aggregate { new S{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} }; // expected-error {{cannot omit braces}} } + void bracing_construct() { + (void) S{ {1, 2}, {3, 4}, { {5}, {6} }, { {7, 8} } }; // completely braced + (void) S{ 1, 2, 3, 4, 5, 6 }; // expected-error 5 {{cannot omit braces}} + (void) S{ {1, 2}, {3, 4}, {5, 6}, { {7, 8} } }; // expected-error 2 {{cannot omit braces}} + (void) S{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} }; // expected-error {{cannot omit braces}} + } + struct String { String(const char*); }; |