================ @@ -8392,17 +8392,19 @@ def ext_default_init_const : ExtWarn< "is a Microsoft extension">, InGroup<MicrosoftConstInit>; def err_delete_operand : Error<"cannot delete expression of type %0">; +def err_delete_void_ptr_operand : Error< + "cannot delete pointer to %0">; def ext_delete_void_ptr_operand : ExtWarn< - "cannot delete expression with pointer-to-'void' type %0">, + "cannot delete pointer to %0">, InGroup<DeleteIncomplete>; def err_ambiguous_delete_operand : Error< "ambiguous conversion of delete expression of type %0 to a pointer">; def warn_delete_incomplete : Warning< - "deleting pointer to incomplete type %0 is incompatible with C++2c" + "deleting pointer to incomplete %select{struct|interface|union|class|enum}0 %1 is incompatible with C++2c" ---------------- shafik wrote:
This change in diagnostic wording is not an improvement. The wording from `p3144r2` literally says: `deleted has incomplete class type at the point of deletion`. I think it would be acceptable to change the wording to say `incomplete class type`, this could be justified as making it easier to search for both in the standard (which has only a few exact matches for this wording) and via regular general searching, where I see `delete "incomplete class type"` comes up with good first hits. https://github.com/llvm/llvm-project/pull/149406 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits