<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/54276>54276</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            `modernize-use-equals-delete` should not warn if all other function declarations are private
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          philnik777
      </td>
    </tr>
</table>

<pre>
    `modernize-use-equals-delete` warns that deleted member functions should be public, even when all other member function declarations aren't.
```
class S {
    void do_stuff(int);
    void do_stuff(long) = delete; // modernize-use-equals-delete warns here

protected:
    void do_other_stuff(int);
    void do_other_stuff(long) = delete; // and here
};
```
https://godbolt.org/z/YGojEGa1s

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNUk1zmzAQ_TXiojGDBbLgwCGpk_yAnnrqSGgxSmWJ6MOZ5Nd3jWmbulNPGCFY7dvdt2-lvH7rya46eg3BmXfY5AgbeMnSxo0GCwnQS19lcJGmSSZ6OdT0CEcFgY7ZDcl49MbJZ6upAjpnZc1A2BcKJ3D0dcJNWkt9mjDiKhATDlYGeUkiAzjCRCpJtSfVHdZe12IiMEb6lRJxfzmg-Jy80VT77zHlcSSsNS4R1pH6BsR6d0AMJfV-7QfhlLBHXPSGFKsO2AWs_JZ9Dj7BgKKQ-u7fokvXn2H3N_AmR-n0RxZi_zvhlWJTSnM801riDl4rb1PpA6Z-fMf325N_fniS23iBF7qvdVd3skgmWfjEzVin7nxaxKFm_DDq_86YzsGcZIIiB9tfcTRpyqoc_BENa0-_PhtU-RlVRtPEmCHiD2-Y2BVTL7Rs6pENnO_qTg1yGDvgDddtteNdK1hhpQIbe8LvCWNIxR02yeg3NAjfF6ZnFWNVXbXbhjPGSyXUKLej4k2r2oEL0lRwlMaWZyJn9YrQL5xUPkR0WhNT_OPES2oODmCph_llTpMP_TwZ68wPIUSxdNAv9H8C0rceZw">