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

Aaron H Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 21 11:48:09 PDT 2022


AaronLiu added a comment.

When compile the following valid testcase:

  void foo()
  {
          int x = [x](int y[sizeof x]){return sizeof x;}(0);
  }

It will complain:

  error: captured variable 'x' cannot appear here
          int x = [x](int y[sizeof x]){return sizeof x;}(0);
                                   ^

The issue is also described in: https://cplusplus.github.io/CWG/issues/2569.html


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