@@ -4176,8 +4176,15 @@ class Sema final : public SemaBase {
41764176 /// return statement in the scope of a variable has the same NRVO candidate,
41774177 /// that candidate is an NRVO variable.
41784178 void computeNRVO(Stmt *Body, sema::FunctionScopeInfo *Scope);
4179- Decl *ActOnFinishFunctionBody(Decl *Decl, Stmt *Body);
4180- Decl *ActOnFinishFunctionBody(Decl *Decl, Stmt *Body, bool IsInstantiation);
4179+
4180+ /// Performs semantic analysis at the end of a function body.
4181+ ///
4182+ /// \param RetainFunctionScopeInfo If \c true, the client is responsible for
4183+ /// releasing the associated \p FunctionScopeInfo. This is useful when
4184+ /// building e.g. LambdaExprs.
4185+ Decl *ActOnFinishFunctionBody(Decl *Decl, Stmt *Body,
4186+ bool IsInstantiation = false,
4187+ bool RetainFunctionScopeInfo = false);
41814188 Decl *ActOnSkippedFunctionBody(Decl *Decl);
41824189 void ActOnFinishInlineFunctionDef(FunctionDecl *D);
41834190
@@ -6874,23 +6881,23 @@ class Sema final : public SemaBase {
68746881 assert(!ExprEvalContexts.empty() &&
68756882 "Must be in an expression evaluation context");
68766883 return ExprEvalContexts.back();
6877- };
6884+ }
68786885
68796886 ExpressionEvaluationContextRecord ¤tEvaluationContext() {
68806887 assert(!ExprEvalContexts.empty() &&
68816888 "Must be in an expression evaluation context");
68826889 return ExprEvalContexts.back();
6883- };
6890+ }
68846891
68856892 ExpressionEvaluationContextRecord &parentEvaluationContext() {
68866893 assert(ExprEvalContexts.size() >= 2 &&
68876894 "Must be in an expression evaluation context");
68886895 return ExprEvalContexts[ExprEvalContexts.size() - 2];
6889- };
6896+ }
68906897
68916898 const ExpressionEvaluationContextRecord &parentEvaluationContext() const {
68926899 return const_cast<Sema *>(this)->parentEvaluationContext();
6893- };
6900+ }
68946901
68956902 bool isAttrContext() const {
68966903 return ExprEvalContexts.back().ExprContext ==
@@ -9140,8 +9147,7 @@ class Sema final : public SemaBase {
91409147
91419148 /// Complete a lambda-expression having processed and attached the
91429149 /// lambda body.
9143- ExprResult BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc,
9144- sema::LambdaScopeInfo *LSI);
9150+ ExprResult BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc);
91459151
91469152 /// Get the return type to use for a lambda's conversion function(s) to
91479153 /// function pointer type, given the type of the call operator.
0 commit comments