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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] "modernize-use-auto" - shared pointer specific casts not supported
        </td>
    </tr>

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

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

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

<pre>
    
As the doc says, the check handles `static_cast,` `dynamic_cast,` `const_cast,` `reinterpret_cast,` functional casts, C-style casts and function templates that behave as casts, such as `llvm::dyn_cast,` `boost::lexical_cast` and `gsl::narrow_cast.` Calls to function templates are considered to behave as casts if the first template argument is explicit and is a type, and the function returns that type, or a pointer or reference to it.

Nothing written about `std::static_pointer_cast`, `std::dynamic_pointer_cast`, `std::const_pointer_cast`, `std::reinterpret_pointer_cast`, so I suggest to add support of all of them and their boost analogues.

Below is the sample how do I see such transformation.

BEFORE:
```
std::shared_ptr<const Derived> d = std::dynamic_pointer_cast<const Derived>(get_base());
std::shared_ptr<Derived> dm = std::const_pointer_cast<Derived>(d);
```

AFTER:
```
auto d = std::dynamic_pointer_cast<const Derived>(get_base());
auto dm = std::const_pointer_cast<Derived>(d);
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVMFu4zgM_RrlQiRQ5NiNDz6kaQPsZRcY7L1gJMbWriwZEt1O5usXspM203ZnLgUMGCYfxfeeaGJKtvVEjSjvRfmwwJG7EBtD_keISsrFMZhzI-Rul4A7AhM0JDwnofbTt-5I_wsdeuMogahkYmSrnzQmFmovKpmD5uyx_xDVwSd-F4tkPVMcIv2UOY1esw0eHeTo1H6_THx2NAcAvXlFAVM_OGTKnJHhSB0-E2B6K06j7nJAVNK5514UO1HszNm_o3MMIfGcdPTdanQzoJJTQ1HJNrk57zHG8DKlVzm_R-cScPiMFUaCrN4aimQy6B1FsKfJ3pONiV8LAWM79uQZbAL6PjirLU9EbAIEPg-UteXAVHxtHInH6C9mXFEhAsIQJrvzR6QTRfKaMh3LKyF3Qu7-DNxZ38JLtMzkAY9h5Pmezaz7cuGXk6725A63qOsE_AY2j8RvQLcz8gk0BfgD0ti2lK0LgMZAGochRIZwAnQuv7ij_uqUjTBdNKBHF9qR0kX9Pbnwks3NdibsB0fQhRcwUwuieYw4ok-nEHvMbl9LHw9_fXvMhOUuE5sfuXvzrcNI5mngKIr9pBseKNpnMqJ4BAOieIBf2_exTKhtS_x0xERCbYWq81Pc_2_b24b9zx0_uYlbvFBb83r4rb68Kg5_P377qBxHDl-uaz70i7gvTFOYuqhxQc36blPUVa3W9aJrar29O-pyKzd3eMKyritJW2lIravtBjflwjZKqlJuZLWuy6KoVxuSJaq7rcQS10VVi42kHq1b5W2zCrFd2JRGatbFpizrhcMjuTQtYaW0Q98u2ZqzUCov5djkquVxbJPYSGcTp7dz2LKb1vdNWfkAQqk-GIre_qDlmGiZnRJKwRLmEXj999NA2p6svmweH_j6u5BZjNE1HfOQsrPqINShtdyNx5UOvVCHaXfOr-UQwz-kWajDJC0Jdbioe27UfwEAAP__wHQUHA">