function call operator (to the lambda class). This allows us to IRgen
calls to simple (non-capturing) lambdas, e.g.,
[](int i, int j) -> int { return i + j; }(1, 2)
Eli will be providing test cases as he brings up more IRgen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150166
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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)