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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy: bugprone-multi-level-implicit-pointer-conversion should ignore malloc/calloc/realloc/free
        </td>
    </tr>

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

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

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

<pre>
    clang-tidy's `bugprone-multi-level-implicit-pointer-conversion` gives 48 warnings in my codebase. None are actual bugs. All but 2 of them are warning about malloc/calloc/realloc/reallocf/free.

Seems to me that warnings on these functions is not often going to be useful:
 
- malloc returns `void*`, but usually you're not assigning to an actual `void*`
- free takes `void*`, but often one passes some specific type, not an actual `void*`

Might it be appropriate to not issue such warnings when these function are involved?

Or perhaps add on option allowing such functions to be listed for suppression?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUU8GO6zYM_Br5QjhQ5DiODz6kLXxre-gXyDZtq5VFQZS8yN8XcvKQ7QJb4J3EAzWcGXI0s1kcYifqX0T9W6FTXCl0jNptxUDToxutdksZzfQQqmEQVzmkxQdyWG7JRlNa3NGWZvPWjCaWnoyLGMqR3I6BDTlxlbCYHRkuN_jQwRm3MBgH2wNGmnDQjCf4gxyCDgh6jElbGNLCJ7jbXEVQQDPEFbej5QUCeqAUYdPW0ihUP_4oAn6pZqH6OSCehLwLef8LcWOIBBtCXHV8syKXpzDCnNwYDTkGw-AoAs0RHSyU50aCASExzsmKKiOCkPfyxQQCxhTc4dVOZhLqLq5SqF8PJYmTtvYBD0pCNQEP8OcaXtDa_fDgvwB5QhYBUf-D36A_WWYrvWZGBqYNgT2OZjYjxIfH3HrM_HaMkPffzbJGMDHr1N4H8sHoiJle_muYEwKncX1b97HiV_OOZRm3k91xElX_xP4zgMewas-gpylbTv7ZbS19ZBMO4PcGnnZbwxEnmCkAJ-8D8nFcVV9MXTW1VasL7M7NpWlk09a3Yu2aW93K2zxW9XnW07k-y6Zq61ZNqtYVtnVhOiVVLWslpVJ1fTtV49DMTXUbmgEvQ63FReKmjT1Zu28nCktxKO_OF3mt28LqAS0f2VHqc1BUzlLo8q8yH7K4yEyf3zjRRIufw1Xd4WeDBbxSshOYxVHA_81BvpsiBdutMXrON6t6ofrFxDUNp5E2ofrM7fWUPtDfOEah-kMwC9W_NO-d-jcAAP__BUFtXg">