aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/aggregate-initialization.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-09-05 02:13:09 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-09-05 02:13:09 +0000
commit017ab77655b262311a3550342ca19b85380f8f20 (patch)
tree9ab45c95b9199557e88c17616b7ebba656b232f5 /test/SemaCXX/aggregate-initialization.cpp
parentf747ce6235e9257230846f52b5fc79e65c210444 (diff)
Implement the suggested resolution of WG21 N3307 issue 19: When determining whether a class is an aggregate in C++0x, treat all functions which are neither deleted nor defaulted as user-provided, not just special member functions. The wording of the standard only defines the term "user-provided" for special member functions, but the intent seems to be that any function can be user-provided.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/aggregate-initialization.cpp')
-rw-r--r--test/SemaCXX/aggregate-initialization.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaCXX/aggregate-initialization.cpp b/test/SemaCXX/aggregate-initialization.cpp
index b9e69b00b7..90d0ead920 100644
--- a/test/SemaCXX/aggregate-initialization.cpp
+++ b/test/SemaCXX/aggregate-initialization.cpp
@@ -2,8 +2,8 @@
// Verify that we can't initialize non-aggregates with an initializer
// list.
-// FIXME: Note that due to a (likely) standard bug, this is technically an
-// aggregate.
+// Note that due to a (likely) standard bug, this is technically an aggregate,
+// but we do not treat it as one.
struct NonAggr1 {
NonAggr1(int) { }
@@ -24,7 +24,7 @@ struct NonAggr4 {
virtual void f();
};
-NonAggr1 na1 = { 17 };
+NonAggr1 na1 = { 17 }; // expected-error{{non-aggregate type 'NonAggr1' cannot be initialized with an initializer list}}
NonAggr2 na2 = { 17 }; // expected-error{{non-aggregate type 'NonAggr2' cannot be initialized with an initializer list}}
NonAggr3 na3 = { 17 }; // expected-error{{non-aggregate type 'NonAggr3' cannot be initialized with an initializer list}}
NonAggr4 na4 = { 17 }; // expected-error{{non-aggregate type 'NonAggr4' cannot be initialized with an initializer list}}