[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 5 12:55:31 PDT 2023


rsmith added a comment.

I'm happy whenever Aaron is.



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:8809
+  //
+  // We will support P2448R2 in language modes earlier than C++23 as an extenion
+  // The concept of constexpr-compatible was removed.
----------------



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:8826-8827
+          getLangOpts().CPlusPlus2b
+              ? diag::warn_cxx2b_compat_incorrect_defaulted_comparison_constexpr
+              : diag::ext_incorrect_defaulted_comparison_constexpr)
           << FD->isImplicit() << (int)DCK << FD->isConsteval();
----------------
I wonder if `incorrect_` is the best way to spell the diagnostic ID given the new rule. Suggested an alternative.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146090/new/

https://reviews.llvm.org/D146090



More information about the cfe-commits mailing list