[libc-commits] [flang] [libc] [lldb] [compiler-rt] [llvm] [clang-tools-extra] [libcxx] [lld] [clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

Mariya Podchishchaeva via libc-commits libc-commits at lists.llvm.org
Wed Jan 24 01:08:42 PST 2024


================
@@ -9108,7 +9123,8 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD,
   //   declaration, it is implicitly considered to be constexpr.
   // FIXME: Only applying this to the first declaration seems problematic, as
   // simple reorderings can affect the meaning of the program.
-  if (First && !FD->isConstexpr() && Info.Constexpr)
+  if ((First && !FD->isConstexpr() && Info.Constexpr) ||
+      getLangOpts().CPlusPlus23)
----------------
Fznamznon wrote:

This change perhaps needs a test.

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


More information about the libc-commits mailing list