[clang] 058f04e - [clang] Fix another case where CPlusPlus2b is still used.

Michael Liao via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 11:28:24 PDT 2023


Author: Michael Liao
Date: 2023-05-04T14:27:33-04:00
New Revision: 058f04ea7dcbafbeed271fa75ee65e41409b4479

URL: https://github.com/llvm/llvm-project/commit/058f04ea7dcbafbeed271fa75ee65e41409b4479
DIFF: https://github.com/llvm/llvm-project/commit/058f04ea7dcbafbeed271fa75ee65e41409b4479.diff

LOG: [clang] Fix another case where CPlusPlus2b is still used.

Added: 
    

Modified: 
    clang/lib/Sema/SemaDeclCXX.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 5b7ee09ac4c7..208e34a40e48 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -8829,7 +8829,7 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD,
         CheckConstexprParameterTypes(*this, FD, CheckConstexprKind::Diagnose) &&
         !Info.Constexpr) {
       Diag(FD->getBeginLoc(),
-           getLangOpts().CPlusPlus2b
+           getLangOpts().CPlusPlus23
                ? diag::warn_cxx2b_compat_defaulted_comparison_constexpr_mismatch
                : diag::ext_defaulted_comparison_constexpr_mismatch)
           << FD->isImplicit() << (int)DCK << FD->isConsteval();


        


More information about the cfe-commits mailing list