@@ -4067,7 +4067,10 @@ def err_ovl_deleted_oper : Error<
4067
4067
"overload resolution selected deleted operator '%0'">;
4068
4068
def err_ovl_deleted_special_oper : Error<
4069
4069
"object of type %0 cannot be %select{constructed|copied|moved|assigned|"
4070
- "assigned|destroyed}1 because its %sub{select_special_member_kind}1 is implicitly deleted">;
4070
+ "assigned|destroyed}1 because its %sub{select_special_member_kind}1 is "
4071
+ "implicitly deleted">;
4072
+ def err_ovl_deleted_comparison : Error<
4073
+ "object of type %0 cannot be compared because its %1 is implicitly deleted">;
4071
4074
def err_ovl_rewrite_equalequal_not_bool : Error<
4072
4075
"return type %0 of selected 'operator==' function for rewritten "
4073
4076
"'%1' comparison is not 'bool'">;
@@ -8152,7 +8155,7 @@ def err_incorrect_defaulted_consteval : Error<
8152
8155
"cannot be consteval because implicit definition is not constexpr">;
8153
8156
def warn_defaulted_method_deleted : Warning<
8154
8157
"explicitly defaulted %sub{select_special_member_kind}0 is implicitly "
8155
- "deleted">, InGroup<DiagGroup<"defaulted-function-deleted"> >;
8158
+ "deleted">, InGroup<DefaultedFunctionDeleted >;
8156
8159
def err_out_of_line_default_deletes : Error<
8157
8160
"defaulting this %sub{select_special_member_kind}0 "
8158
8161
"would delete it after its first declaration">;
@@ -8194,21 +8197,42 @@ def err_defaulted_comparison_non_const : Error<
8194
8197
def err_defaulted_comparison_return_type_not_bool : Error<
8195
8198
"return type for defaulted %sub{select_defaulted_comparison_kind}0 "
8196
8199
"must be 'bool', not %1">;
8197
- def err_defaulted_comparison_reference_member : Error<
8198
- "cannot default %0 in class %1 with reference member">;
8199
- def ext_defaulted_comparison_reference_member : ExtWarn<
8200
- "ISO C++2a does not allow defaulting %0 in class %1 with reference member">,
8201
- InGroup<DefaultedComparison>;
8202
- def note_reference_member : Note<"reference member %0 declared here">;
8203
- def err_defaulted_comparison_union : Error<
8204
- "cannot default %0 in %select{union-like class|union}1 %2">;
8205
- def ext_defaulted_comparison_union : ExtWarn<
8206
- "ISO C++2a does not allow defaulting %0 in "
8207
- "%select{union-like class|union}1 %2">, InGroup<DefaultedComparison>;
8208
- def ext_defaulted_comparison_empty_union : ExtWarn<
8209
- "ISO C++2a does not allow defaulting %0 in "
8210
- "%select{union-like class|union}1 %2 despite it having no variant members">,
8211
- InGroup<DefaultedComparison>;
8200
+ def warn_defaulted_comparison_deleted : Warning<
8201
+ "explicitly defaulted %sub{select_defaulted_comparison_kind}0 is implicitly "
8202
+ "deleted">, InGroup<DefaultedFunctionDeleted>;
8203
+ def err_non_first_default_compare_deletes : Error<
8204
+ "defaulting this %sub{select_defaulted_comparison_kind}0 "
8205
+ "would delete it after its first declaration">;
8206
+ def note_defaulted_comparison_union : Note<
8207
+ "defaulted %0 is implicitly deleted because "
8208
+ "%2 is a %select{union-like class|union}1 with variant members">;
8209
+ def note_defaulted_comparison_reference_member : Note<
8210
+ "defaulted %0 is implicitly deleted because "
8211
+ "class %1 has a reference member">;
8212
+ def note_defaulted_comparison_ambiguous : Note<
8213
+ "defaulted %0 is implicitly deleted because implied %select{|'==' |'<' }1"
8214
+ "comparison %select{|for member %3 |for base class %3 }2is ambiguous">;
8215
+ def note_defaulted_comparison_calls_deleted : Note<
8216
+ "defaulted %0 is implicitly deleted because it would invoke a deleted "
8217
+ "comparison function%select{| for member %2| for base class %2}1">;
8218
+ def note_defaulted_comparison_no_viable_function : Note<
8219
+ "defaulted %0 is implicitly deleted because there is no viable comparison "
8220
+ "function%select{| for member %2| for base class %2}1">;
8221
+ def note_defaulted_comparison_no_viable_function_synthesized : Note<
8222
+ "three-way comparison cannot be synthesized because there is no viable "
8223
+ "function for %select{'=='|'<'}0 comparison">;
8224
+ def note_defaulted_comparison_not_rewritten_callee : Note<
8225
+ "defaulted %0 is implicitly deleted because this non-rewritten comparison "
8226
+ "function would be the best match for the comparison">;
8227
+ def err_incorrect_defaulted_comparison_constexpr : Error<
8228
+ "defaulted definition of %sub{select_defaulted_comparison_kind}0 "
8229
+ "cannot be declared %select{constexpr|consteval}1 because it invokes "
8230
+ "a non-constexpr comparison function">;
8231
+ def note_defaulted_comparison_not_constexpr : Note<
8232
+ "non-constexpr comparison function would be used to compare "
8233
+ "%select{|member %1|base class %1}0">;
8234
+ def note_defaulted_comparison_not_constexpr_here : Note<
8235
+ "non-constexpr comparison function declared here">;
8212
8236
8213
8237
def ext_implicit_exception_spec_mismatch : ExtWarn<
8214
8238
"function previously declared with an %select{explicit|implicit}0 exception "
0 commit comments