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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] -Wself-assign should be enabled by default
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:diagnostics
      </td>
    </tr>

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

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

<pre>
    Currently, Clang doesn't seem to enable `-Wself-assign` by default without a good reason I can see. Anything this diagnoses is almost certainly a bug. This doesn't warn on weird user-defined operators either, since there is `-Wself-assign-overloaded` for that case.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxckcuu4yoQRb8GT0q2MH4dDzzIzVGkO2-px4Up23QTiKhyovx9y-moXyOEBLv2qoXMfo1Ek-r-U91ngbtsKU-3zYfovw_DUNjkntN5z5mihKcyZzgHjCu4RByVGQSY6AqSgCLaQKB6XX5lCkv5M1z1GuwTHC24B4GHly3tAghrSg4yIacI_8OM8Uiq4BSfsvm4gmyewXlcY2Ji8AwYrokFZsqCPoYnINh9reDL6-WvQg_MEVKEB_nsYGfKpaPFR3KQbpRRUmYgLxvlg4d9nAmOGx1D_u1fpjvlkNCRO1CWlEE2FJiRqVL6VLipcWMzYkFTPXTNx9CObV9sU6c_0GHTdiN19oNq1_Zu1MYgmlbPdiz8ZLTp9NDoujaj7qoB7aiX1pLre9MtTrWaruhDFcL9WqW8Fp55p6nu6qY2RUBLgV_qjJkPK6o5vRcmfmZlzOE0T8f30u4rq1YHz8K_A8VLeNl_WVXdJ_wFD7ylPTiw9Nbr_nBZ7DlMm8iNVXNS5qLMZfWy7baa01WZyzHkfZS3nL7RLMpcXgiszOVNcZ_MjwAAAP__CSXWmA">