[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 4 12:05:43 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));
----------------
a-tarasyuk wrote:

@AaronBallman Thanks for the review. Should a new option (`-Winvalid-constexpr`) be added to control warnings for this case? Is that what you're referring to?

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


More information about the cfe-commits mailing list