[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 4 09:36:07 PDT 2024
================
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -Wno-return-type -std=c++23 -fsyntax-only -verify %s
+// expected-no-diagnostics
+constexpr int f() { }
+static_assert(__is_same(decltype([] constexpr -> int { }( )), int));
----------------
AaronBallman wrote:
For C++23, I think users will have to use `-Winvalid-constexpr` to be notified of "this will never be valid in a constant expression" thanks to P2448.
https://github.com/llvm/llvm-project/pull/94123
More information about the cfe-commits
mailing list