[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 4 01:25:01 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));
----------------
Fznamznon wrote:
Should we emit at least a warning in case of missing return statement and non-void function and check it?
https://github.com/llvm/llvm-project/pull/94123
More information about the cfe-commits
mailing list