mizvekov added inline comments.
Comment at: clang/test/CXX/class/class.compare/class.spaceship/p2.cpp:200
+ struct b3 {
+auto operator<=>(b3 const &) const = default; // expected-error {{cannot
be deduced because three-way comparison for member 'f' would compare as builtin
rsmith added inline comments.
Comment at: clang/test/CXX/class/class.compare/class.spaceship/p2.cpp:200
+ struct b3 {
+auto operator<=>(b3 const &) const = default; // expected-error {{cannot
be deduced because three-way comparison for member 'f' would compare as builtin
mizvekov added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:7876
+ diag::
+
err_defaulted_comparison_cannot_deduce_unsupported_builtin_type)
+ << Subobj.Kind << Subobj.Decl << T;
I think this
mizvekov created this revision.
mizvekov requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
When deducing the return type of defaulted three-way comparison, instead
of asserting in the case of unsupported builtin types, just diagnose it.
For