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

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 11 08:16:38 PST 2023


cor3ntin added inline comments.


================
Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:295-298
+  if (getCurLambda()) {
+    Diag(SuperLoc, diag::err_super_in_lambda_unsupported);
+    return true;
+  }
----------------
rsmith wrote:
> Will this also reject `__super` in a local class inside a lambda? That seems like something we should still permit.
https://godbolt.org/z/dEj3vG8nc 
Seems to work fine -

In both cases we create a non capturing function scope so `getCurLambda` returns nullptr


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