[llvm] [clang-tools-extra] [clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 04:58:58 PST 2024


================
@@ -1731,11 +1731,7 @@ static bool CheckConstexprDestructorSubobjects(Sema &SemaRef,
       SemaRef.Diag(Loc, diag::note_constexpr_dtor_subobject)
           << !FD << (FD ? FD->getDeclName() : DeclarationName()) << T;
     }
-
-    if (SemaRef.getLangOpts().CPlusPlus23)
-      return true;
-
-    return false;
+    return !!SemaRef.getLangOpts().CPlusPlus23;
----------------
cor3ntin wrote:

i missed the lambda sorry. Looks fine (alternatively `-> bool` might be just as clean)

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


More information about the cfe-commits mailing list