diff options
Diffstat (limited to 'lib/Sema/SemaLambda.cpp')
-rw-r--r-- | lib/Sema/SemaLambda.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index d59018dedc..6d8e6a1029 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/lib/Sema/SemaLambda.cpp @@ -351,7 +351,9 @@ ExprResult Sema::ActOnLambdaExpr(SourceLocation StartLoc, // C++ [expr.prim.lambda]p7: // The lambda-expression's compound-statement yields the // function-body (8.4) of the function call operator [...]. - ActOnFinishFunctionBody(LSI->CallOperator, Body, /*IsInstantation=*/false); + CXXMethodDecl *CallOperator = LSI->CallOperator; + ActOnFinishFunctionBody(CallOperator, Body, /*IsInstantation=*/false); + CallOperator->setLexicalDeclContext(Class); } if (LambdaExprNeedsCleanups) |