File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3256,6 +3256,9 @@ class InitListTransformer {
3256
3256
QualType InitTy;
3257
3257
QualType *DstIt = nullptr ;
3258
3258
Expr **ArgIt = nullptr ;
3259
+ // Is wrapping the destination type iterator required? This is only used for
3260
+ // incomplete array types where we loop over the destination type since we
3261
+ // don't know the full number of elements from the declaration.
3259
3262
bool Wrap;
3260
3263
3261
3264
bool castInitializer (Expr *E) {
@@ -3269,8 +3272,8 @@ class InitListTransformer {
3269
3272
}
3270
3273
DstIt = DestTypes.begin ();
3271
3274
}
3272
- InitializedEntity Entity =
3273
- InitializedEntity::InitializeParameter ( Ctx, *DstIt, true );
3275
+ InitializedEntity Entity = InitializedEntity::InitializeParameter (
3276
+ Ctx, *DstIt, /* Consumed (ObjC) */ false );
3274
3277
ExprResult Res = S.PerformCopyInitialization (Entity, E->getBeginLoc (), E);
3275
3278
if (Res.isInvalid ())
3276
3279
return false ;
@@ -3422,6 +3425,8 @@ class InitListTransformer {
3422
3425
bool buildInitializerList (Expr *E) { return buildInitializerListImpl (E); }
3423
3426
3424
3427
Expr *generateInitLists () {
3428
+ assert (!ArgExprs.empty () &&
3429
+ " Call buildInitializerList to generate argument expressions." );
3425
3430
ArgIt = ArgExprs.begin ();
3426
3431
if (!Wrap)
3427
3432
return generateInitListsImpl (InitTy);
You can’t perform that action at this time.
0 commit comments