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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] Unclear purpose/usefulness/actionability of `portability-template-virtual-member-function`
        </td>
    </tr>

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

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

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

<pre>
    I came across the `portability-template-virtual-member-function` check and don't really understand how the check is useful or actionable. It's not clear as a user what I'm supposed to do to "fix" the code and silence the warning.

The example in the docs shows that there's a compiler error, but that compiler error is not visible in GCC or Clang because the function is not instantiated. It is however visible in MSVC because it is instantiated.

I see two possible scenarios:

- I only ever use GCC/Clang, then I can just disable the check.
- I use both GCC/Clang and MSVC, in which case I'll get a compiler error from MSVC, prompting me to fix the compiler error (that goes unnoticed by GCC). Once I fix the compiler error, clang-tidy still complains, even though I've resolved the actual issue.

So I personally do not see the value in this check, it only bans the usage of `virtual` member functions in class templates. I would vote for removing it altogether, or at the very least improving the docs to show  how people are supposed to fix their code to comply with the check.




</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVE2v4zYM_DXKhUjgyHE-Dj68ZpFFDkUP2_Yuy4ytrSwaEu289NcXlPO-UPRQIIgBiaSGMxyalFwXEGtV_aKqbyszcU-xtiZ6Sp3xM_49rhpqH_UVrBkQjI2UEnCPoPbFSJFN47zjx5pxGL1hXM8u8mT8esChwbi-TcGyo6D2Bdge7V9gQgstBaUPDBGN9w-YQosxsdz0dM_ll1iXYEp4mzxQBJMLmcbjBq6s9CFBIAbr0UQwCYzERrj3huGq9GGANI0jJWyBCVqSf6X1zb0qrZdHqMWMJzmPwWI-vJsYXOg2qnhRxcvvPQK-mmH0CC7kgJZsgtTTXYgwLGcRMxwDlobReYyAMVJU-gzNxEvY1yt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