[PATCH] D111400: [Clang] Implement P2242R3
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 15 11:38:30 PDT 2022
aaron.ballman added a comment.
In D111400#3383006 <https://reviews.llvm.org/D111400#3383006>, @hubert.reinterpretcast wrote:
> @aaron.ballman @cor3ntin, are we confident that testing the non-lambda cases is sufficient to cover the lambda cases as well?
I think lambdas are just odd enough that they'd be worth testing independently.
> I suggest using a pattern such as:
>
> int (*test_cxx2b_constexpr_label_in_body())() {
> auto qq = []() {
> label: return 42;
> };
> const int x = qq();
> auto ff = [] { return x; }; // passes in C++2b; error in C++20
> return ff;
> }
>
> For each of the cases.
Not a bad way to test that!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111400/new/
https://reviews.llvm.org/D111400
More information about the cfe-commits
mailing list