[PATCH] D133659: [Clang] P1169R4: static operator()

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 10:36:34 PDT 2022


cor3ntin added inline comments.


================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:1265
+  if (Intro.hasLambdaCapture())
+    P.Diag(StaticLoc, diag::err_static_lambda_captures);
+}
----------------
aaron.ballman wrote:
> aaron.ballman wrote:
> > royjacobson wrote:
> > > cor3ntin wrote:
> > > > We might want to add a note showing where the capture list is.
> > > I added a note, but the captures list is always just before the static specifier, so I'm not sure how useful it is. WDYT?
> > > 
> > FWIW, I'm not sure the note adds a whole lot of value. @cor3ntin, do you have a code example in mind where you think the note would be clarifying?
> I think we should remove the note here -- we can add a note back when we run into a use case where it would be enlightening.
I was just thinking that with sufficient attributes, templates, require clauses and parameters, the lambda might be cluttered enough that a note would not hurt. I'm not strongly attached to it though


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133659



More information about the cfe-commits mailing list