aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 9bd1074116..0d43afcd81 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -9642,6 +9642,7 @@ static ExprResult captureInLambda(Sema &S, LambdaScopeInfo *LSI,
bool InitializingArray = false;
QualType BaseType = FieldType;
QualType SizeType = S.Context.getSizeType();
+ LSI->ArrayIndexStarts.push_back(LSI->ArrayIndexVars.size());
while (const ConstantArrayType *Array
= S.Context.getAsConstantArrayType(BaseType)) {
InitializingArray = true;
@@ -9660,7 +9661,8 @@ static ExprResult captureInLambda(Sema &S, LambdaScopeInfo *LSI,
S.Context.getTrivialTypeSourceInfo(SizeType, Loc),
SC_None, SC_None);
IndexVariables.push_back(IterationVar);
-
+ LSI->ArrayIndexVars.push_back(IterationVar);
+
// Create a reference to the iteration variable.
ExprResult IterationVarRef
= S.BuildDeclRefExpr(IterationVar, SizeType, VK_LValue, Loc);