@@ -138,8 +138,8 @@ static_assert(!b4); // ref-error {{not an integral constant expression}} \
138
138
namespace UninitializedFields {
139
139
class A {
140
140
public:
141
- int a; // expected-note 2 {{subobject declared here}} \
142
- // ref-note 2 {{subobject declared here}}
141
+ int a; // expected-note 3 {{subobject declared here}} \
142
+ // ref-note 3 {{subobject declared here}}
143
143
constexpr A () {}
144
144
};
145
145
constexpr A a; // expected-error {{must be initialized by a constant expression}} \
@@ -174,19 +174,15 @@ namespace UninitializedFields {
174
174
// ref-error {{must be initialized by a constant expression}} \
175
175
// ref-note {{subobject 'a' is not initialized}}
176
176
177
-
178
- // FIXME: These two are currently disabled because the array fields
179
- // cannot be initialized.
180
- #if 0
181
177
class C3 {
182
178
public:
183
179
A a[2 ];
184
180
constexpr C3 () {}
185
181
};
186
182
constexpr C3 c3; // expected-error {{must be initialized by a constant expression}} \
187
- // expected-note {{subobject of type 'int ' is not initialized}} \
183
+ // expected-note {{subobject 'a ' is not initialized}} \
188
184
// ref-error {{must be initialized by a constant expression}} \
189
- // ref-note {{subobject of type 'int ' is not initialized}}
185
+ // ref-note {{subobject 'a ' is not initialized}}
190
186
191
187
class C4 {
192
188
public:
@@ -195,10 +191,9 @@ namespace UninitializedFields {
195
191
constexpr C4 (){}
196
192
};
197
193
constexpr C4 c4; // expected-error {{must be initialized by a constant expression}} \
198
- // expected-note {{subobject of type 'bool ' is not initialized}} \
194
+ // expected-note {{subobject 'B ' is not initialized}} \
199
195
// ref-error {{must be initialized by a constant expression}} \
200
- // ref-note {{subobject of type 'bool' is not initialized}}
201
- #endif
196
+ // ref-note {{subobject 'B' is not initialized}}
202
197
};
203
198
204
199
namespace ConstThis {
0 commit comments