[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 17 05:47:28 PDT 2022
cor3ntin created this revision.
Herald added a project: All.
cor3ntin requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Partially implement the proposed resolution to CWG2569.
D119136 <https://reviews.llvm.org/D119136> broke some libstdc++ code, as P2036R3, implemented as a DR to
C++11 made ill-formed some previously valid and innocuous code.
We resolve this issue to allow decltype(x) - but not decltype((x)
to appear in the parameter list of a lambda that capture x by copy.
Unlike CWG2569, we do not extend that special treatment to
sizeof/noexcept yet, as the resolution has not been approved yet
and keeping the review small allows a quicker fix of impacted code.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123909
Files:
clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/lambda-capture-type-deduction.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123909.423289.patch
Type: text/x-patch
Size: 10051 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220417/ce0bfab3/attachment-0001.bin>
More information about the cfe-commits
mailing list