summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaLambda.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index d59018dedc9..6d8e6a1029a 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud