[PATCH] D111400: [Clang] Implement P2242R3
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 15 20:58:03 PDT 2022
hubert.reinterpretcast added inline comments.
================
Comment at: clang/test/SemaCXX/constant-expression-cxx2b.cpp:101
+
+ auto b = [](int n) constexpr {
+ if (!n)
----------------
I think a lambda marked `constexpr` and one that isn't has fundamental differences in behaviour in relation to this patch. As noted in previous comments, the `constexpr` case warns and then allows the lambda to be called in constant evaluation. The other case produces no message for the lambda definition itself and does not allow the lambda to be called in a `constexpr` context (even if the control flow is accepted by C++2b).
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