diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 0d929f1836..5de0388c06 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1263,7 +1263,8 @@ static CaptureResult propagateCapture(Sema &S, unsigned ValidScopeIndex, i != e; ++i) { BlockScopeInfo *innerBlock = cast<BlockScopeInfo>(S.FunctionScopes[i]); innerBlock->AddCapture(Cap.getVariable(), Cap.isReferenceCapture(), - /*nested*/ true, Cap.getCopyExpr()); + /*nested*/ true, Cap.getLocation(), + Cap.getCopyExpr()); } return Cap.isReferenceCapture() ? CR_CaptureByRef : CR_Capture; @@ -1377,7 +1378,7 @@ static CaptureResult shouldCaptureValueReference(Sema &S, SourceLocation loc, cast<BlockScopeInfo>(S.FunctionScopes[functionScopesIndex]); // Build a valid capture in this scope. - blockScope->AddCapture(var, byRef, /*nested*/ false, copyExpr); + blockScope->AddCapture(var, byRef, /*nested*/ false, loc, copyExpr); // Propagate that to inner captures if necessary. return propagateCapture(S, functionScopesIndex, |