[PATCH] D124351: [Clang][WIP] Implement Change scope of lambda trailing-return-type
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 24 14:16:31 PDT 2022
cor3ntin created this revision.
Herald added a project: All.
cor3ntin requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.
This implements P2036R3 with the changes proposed by D2579R0 applied.
That is, explicit, int, and implicit capture become visible
at the start of the parameter head.
This approach is meant to address breakages observed in
https://reviews.llvm.org/D119136.
It is based on D119136 <https://reviews.llvm.org/D119136> and D124012 <https://reviews.llvm.org/D124012>.
Most of the code is similar, except that Clang
will do a tentative parse action to try to find a mutable keyword
after the parameter list, and inject the explicit captures in the call
operator context before parsing the template parameter list.
If the code is not-well balanced, there is no degadation in diagnostics,
as we simply fallback to assuming the lambda is not mutable.
In lambda template parameters, naming a capture is still ill-formed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124351
Files:
clang/docs/ReleaseNotes.rst
clang/include/clang/AST/DeclCXX.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/Scope.h
clang/include/clang/Sema/ScopeInfo.h
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Sema/Scope.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaCXXScopeSpec.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaLambda.cpp
clang/lib/Sema/TreeTransform.h
clang/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp
clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp
clang/test/SemaCXX/lambda-capture-type-deduction.cpp
clang/test/SemaCXX/warn-shadow-in-lambdas.cpp
clang/www/cxx_status.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124351.424798.patch
Type: text/x-patch
Size: 94220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220424/31702725/attachment-0001.bin>
More information about the cfe-commits
mailing list