@@ -7103,21 +7103,15 @@ class Sema final {
71037103 std::nullopt);
71047104
71057105 /// Endow the lambda scope info with the relevant properties.
7106- void buildLambdaScope(sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator,
7106+ void buildLambdaScope(sema::LambdaScopeInfo *LSI,
7107+ CXXMethodDecl *CallOperator,
71077108 SourceRange IntroducerRange,
71087109 LambdaCaptureDefault CaptureDefault,
7109- SourceLocation CaptureDefaultLoc, bool ExplicitParams,
7110+ SourceLocation CaptureDefaultLoc,
7111+ bool ExplicitParams,
7112+ bool ExplicitResultType,
71107113 bool Mutable);
71117114
7112- CXXMethodDecl *CreateLambdaCallOperator(SourceRange IntroducerRange,
7113- CXXRecordDecl *Class);
7114- void CompleteLambdaCallOperator(
7115- CXXMethodDecl *Method, SourceLocation LambdaLoc,
7116- SourceLocation CallOperatorLoc, Expr *TrailingRequiresClause,
7117- TypeSourceInfo *MethodTyInfo, ConstexprSpecKind ConstexprKind,
7118- StorageClass SC, ArrayRef<ParmVarDecl *> Params,
7119- bool HasExplicitResultType);
7120-
71217115 /// Perform initialization analysis of the init-capture and perform
71227116 /// any implicit conversions such as an lvalue-to-rvalue conversion if
71237117 /// not being used to initialize a reference.
@@ -7138,9 +7132,11 @@ class Sema final {
71387132 ///
71397133 /// CodeGen handles emission of lambda captures, ignoring these dummy
71407134 /// variables appropriately.
7141- VarDecl *createLambdaInitCaptureVarDecl(
7142- SourceLocation Loc, QualType InitCaptureType, SourceLocation EllipsisLoc,
7143- IdentifierInfo *Id, unsigned InitStyle, Expr *Init, DeclContext *DeclCtx);
7135+ VarDecl *createLambdaInitCaptureVarDecl(SourceLocation Loc,
7136+ QualType InitCaptureType,
7137+ SourceLocation EllipsisLoc,
7138+ IdentifierInfo *Id,
7139+ unsigned InitStyle, Expr *Init);
71447140
71457141 /// Add an init-capture to a lambda scope.
71467142 void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var,
@@ -7150,38 +7146,28 @@ class Sema final {
71507146 /// given lambda.
71517147 void finishLambdaExplicitCaptures(sema::LambdaScopeInfo *LSI);
71527148
7153- /// Deduce a block or lambda's return type based on the return
7154- /// statements present in the body.
7155- void deduceClosureReturnType(sema::CapturingScopeInfo &CSI);
7156-
7157- /// Once the Lambdas capture are known, we can start to create the closure,
7158- /// call operator method, and keep track of the captures.
7159- /// We do the capture lookup here, but they are not actually captured until
7160- /// after we know what the qualifiers of the call operator are.
7161- void ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
7162- Scope *CurContext);
7163-
7164- /// This is called after parsing the explicit template parameter list
7149+ /// \brief This is called after parsing the explicit template parameter list
71657150 /// on a lambda (if it exists) in C++2a.
7166- void ActOnLambdaExplicitTemplateParameterList(LambdaIntroducer &Intro,
7167- SourceLocation LAngleLoc,
7151+ void ActOnLambdaExplicitTemplateParameterList(SourceLocation LAngleLoc,
71687152 ArrayRef<NamedDecl *> TParams,
71697153 SourceLocation RAngleLoc,
71707154 ExprResult RequiresClause);
71717155
7172- void ActOnLambdaClosureQualifiers(LambdaIntroducer &Intro,
7173- SourceLocation MutableLoc);
7156+ /// Introduce the lambda parameters into scope.
7157+ void addLambdaParameters(
7158+ ArrayRef<LambdaIntroducer::LambdaCapture> Captures,
7159+ CXXMethodDecl *CallOperator, Scope *CurScope);
71747160
7175- void ActOnLambdaClosureParameters(
7176- Scope *LambdaScope,
7177- MutableArrayRef<DeclaratorChunk::ParamInfo> ParamInfo );
7161+ /// Deduce a block or lambda's return type based on the return
7162+ /// statements present in the body.
7163+ void deduceClosureReturnType(sema::CapturingScopeInfo &CSI );
71787164
71797165 /// ActOnStartOfLambdaDefinition - This is called just before we start
71807166 /// parsing the body of a lambda; it analyzes the explicit captures and
71817167 /// arguments, and sets up various data-structures for the body of the
71827168 /// lambda.
71837169 void ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro,
7184- Declarator &ParamInfo, const DeclSpec &DS );
7170+ Declarator &ParamInfo, Scope *CurScope );
71857171
71867172 /// ActOnLambdaError - If there is an error parsing a lambda, this callback
71877173 /// is invoked to pop the information about the lambda.
@@ -7276,13 +7262,6 @@ class Sema final {
72767262 LocalInstantiationScope &Scope,
72777263 const MultiLevelTemplateArgumentList &TemplateArgs);
72787264
7279- /// Introduce the instantiated captures of the lambda into the local
7280- /// instantiation scope.
7281- bool addInstantiatedCapturesToScope(
7282- FunctionDecl *Function, const FunctionDecl *PatternDecl,
7283- LocalInstantiationScope &Scope,
7284- const MultiLevelTemplateArgumentList &TemplateArgs);
7285-
72867265 /// used by SetupConstraintCheckingTemplateArgumentsAndScope to recursively(in
72877266 /// the case of lambdas) set up the LocalInstantiationScope of the current
72887267 /// function.
0 commit comments