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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to