[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 30 07:14:43 PST 2023


aaron.ballman added inline comments.


================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:1293
   Actions.PushLambdaScope();
+  Actions.ActOnLambdaIntroducer(Intro, getCurScope());
 
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > Typically, we call an `ActOn` method after having parsed the construct; in this case, we're calling `ActOnLambdaIntroducer()` when it was parsed elsewhere (this is the parsing code for after the introducer). So perhaps this should be moved elsewhere or renamed?
> ActOnLambdaExpressionAfterIntroducer?
> We are actually acting on the lambda introducer, but it needs to be done in these scopes so it's why its there.
Yeah, that's about the best name I can come up with as well. It's a bit messy because there's not really a clear separation of the steps of building up a lambda, but I think it's defensible.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124351/new/

https://reviews.llvm.org/D124351



More information about the cfe-commits mailing list