[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

Jun Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 2 16:23:54 PST 2022


junaire added a comment.

In D119609#3355368 <https://reviews.llvm.org/D119609#3355368>, @erichkeane wrote:

> Does this break a case like this? https://godbolt.org/z/Tc9Ko7hWY

No, after applying the patch, clang accepts the code just like gcc

> it seems the problem is with the Expression statements, and I'm not sure why we are doing "ActOnCapScopeReturnStmt" when we aren't really in a capture scope anymore, right?  I guess we properly diagnose the use of a capture in this scope, but I don't think we should be here in the 1st place.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119609



More information about the cfe-commits mailing list