[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 07:59:20 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:1259
   Actions.PushLambdaScope();
+  Actions.ActOnLambdaIntroducer(Intro, getCurScope());
 
----------------
aaron.ballman wrote:
> cor3ntin wrote:
> > aaron.ballman wrote:
> > > This call surprises me here -- I would expect to see this called from `ParseLambdaIntroducer()` so that anyone who parses a lambda introducer gets the action.
> > This is preexisting that sema for the introducer was done in this function.
> > The only thing that change is that we are doing it before parsiong the parameter instead of after, in the same action.
> > And we need to do it here, because of the scope introduction
> I'd still like to hear why this is being called here instead of when parsing the lambda introducer itself.
> This is preexisting that sema for the introducer was done in this function. The only thing that change is that we are doing it before parsiong the parameter instead of after, in the same action. And we need to do it here, because of the scope introduction

Ah, okay, that's a good reason not to muck with it in this patch. I still think that design is a bit suspect, but it's not a new issue (thank you for pointing that out).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119136



More information about the cfe-commits mailing list