================ @@ -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; ---------------- Fznamznon wrote:
It doesn't let me do so because lambda has deduced type and `SemaRef.getLangOpts().CPlusPlus23` is an `int` but intended return type is `bool`. `!!` is a dirty hack to convert to bool then return the right value. https://github.com/llvm/llvm-project/pull/77753 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits