[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 14 13:52:34 PDT 2023
shafik created this revision.
shafik added reviewers: rsmith, aaron.ballman, erichkeane.
Herald added a project: All.
shafik requested review of this revision.
Prior to P2448R2 <http://wg21.link/P2448R2> we were more aggressive in diagnosing ill-formed `constexpr` functions. Many of these restrictions were relaxed and now it is not required for defaulted comparison operators to call `constexpr` functions.
This behavior is extended to before C++23 and diagnostic for it's use can be enabled w/ `-pedantic` or `-Wc++2b-default-comp-relaxed-constexpr`
This fixes: https://github.com/llvm/llvm-project/issues/61238
https://reviews.llvm.org/D146090
Files:
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CXX/class/class.compare/class.compare.default/p3.cpp
clang/test/CXX/class/class.compare/class.compare.default/p4.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146090.505247.patch
Type: text/x-patch
Size: 10058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230314/3838bff2/attachment-0001.bin>
More information about the cfe-commits
mailing list