summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/cxx0x-initializer-aggregates.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/SemaCXX/cxx0x-initializer-aggregates.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-aggregates.cpp')
-rw-r--r--test/SemaCXX/cxx0x-initializer-aggregates.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/test/SemaCXX/cxx0x-initializer-aggregates.cpp
index f53ac6d..0e9a97d 100644
--- a/test/SemaCXX/cxx0x-initializer-aggregates.cpp
+++ b/test/SemaCXX/cxx0x-initializer-aggregates.cpp
@@ -4,7 +4,6 @@ struct one { char c[1]; };
struct two { char c[2]; };
namespace aggregate {
- // Direct list initialization does NOT allow braces to be elided!
struct S {
int ar[2];
struct T {
@@ -20,25 +19,25 @@ namespace aggregate {
};
void bracing() {
- S s1 = { 1, 2, 3 ,4, 5, 6, 7, 8 }; // no-error
- S s2{ {1, 2}, {3, 4}, { {5}, {6} }, { {7, 8} } }; // completely braced
- S s3{ 1, 2, 3, 4, 5, 6 }; // expected-error 5 {{cannot omit braces}}
- S s4{ {1, 2}, {3, 4}, {5, 6}, { {7, 8} } }; // expected-error 2 {{cannot omit braces}}
- S s5{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} }; // expected-error {{cannot omit braces}}
+ S s1 = { 1, 2, 3 ,4, 5, 6, 7, 8 };
+ S s2{ {1, 2}, {3, 4}, { {5}, {6} }, { {7, 8} } };
+ S s3{ 1, 2, 3, 4, 5, 6 };
+ S s4{ {1, 2}, {3, 4}, {5, 6}, { {7, 8} } };
+ S s5{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} };
}
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}}
+ new S{ {1, 2}, {3, 4}, { {5}, {6} }, { {7, 8} } };
+ new S{ 1, 2, 3, 4, 5, 6 };
+ new S{ {1, 2}, {3, 4}, {5, 6}, { {7, 8} } };
+ new S{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} };
}
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}}
+ (void) S{ {1, 2}, {3, 4}, { {5}, {6} }, { {7, 8} } };
+ (void) S{ 1, 2, 3, 4, 5, 6 };
+ (void) S{ {1, 2}, {3, 4}, {5, 6}, { {7, 8} } };
+ (void) S{ {1, 2}, {3, 4}, { {5}, {6} }, {7, 8} };
}
struct String {
OpenPOWER on IntegriCloud