[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 13:10:00 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:

We already have such an option, but it wasn't until today that the diagnostic worked in C++23: https://github.com/llvm/llvm-project/commit/e5f7123dfef3a80937d088d846ddb3b2bb1869b9

Should be nothing here for you to do.

https://github.com/llvm/llvm-project/pull/94123


More information about the cfe-commits mailing list