From 952eddef9aff85b1e92626e89baaf7a360e2ac85 Mon Sep 17 00:00:00 2001 From: dim <dim@FreeBSD.org> Date: Sun, 22 Dec 2013 00:07:40 +0000 Subject: Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3): https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841 --- test/SemaCXX/cxx0x-initializer-aggregates.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'test/SemaCXX/cxx0x-initializer-aggregates.cpp') 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 { -- cgit v1.1