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 {
32563256 QualType InitTy;
32573257 QualType *DstIt = nullptr ;
32583258 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.
32593262 bool Wrap;
32603263
32613264 bool castInitializer (Expr *E) {
@@ -3269,8 +3272,8 @@ class InitListTransformer {
32693272 }
32703273 DstIt = DestTypes.begin ();
32713274 }
3272- InitializedEntity Entity =
3273- InitializedEntity::InitializeParameter ( Ctx, *DstIt, true );
3275+ InitializedEntity Entity = InitializedEntity::InitializeParameter (
3276+ Ctx, *DstIt, /* Consumed (ObjC) */ false );
32743277 ExprResult Res = S.PerformCopyInitialization (Entity, E->getBeginLoc (), E);
32753278 if (Res.isInvalid ())
32763279 return false ;
@@ -3422,6 +3425,8 @@ class InitListTransformer {
34223425 bool buildInitializerList (Expr *E) { return buildInitializerListImpl (E); }
34233426
34243427 Expr *generateInitLists () {
3428+ assert (!ArgExprs.empty () &&
3429+ " Call buildInitializerList to generate argument expressions." );
34253430 ArgIt = ArgExprs.begin ();
34263431 if (!Wrap)
34273432 return generateInitListsImpl (InitTy);
You can’t perform that action at this time.
0 commit comments