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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] cppcoreguidelines-prefer-member-initializer has too many responsibilities
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy,
            code-cleanup
      </td>
    </tr>

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

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

<pre>
    This check implements 2 rules: C.48 and C.49. C.48 is also implemented by `modernize-use-default-member-init`. The internal logic of the check introduces a tight dependency to the `modernize` check, which is undesirable. There is also code duplication in both checks.

The design principle of clang-tidy checks is that checks are independent of each other, and is not responsibility of the check author to ensure all checks operate well in conjunction with other tests. 

Suggested way forward:

* Remove C.48 from `cppcoreguidelines-prefer-member-initializer`, as well as all coupling to the `modernize` check.
* Implement C.49 as `cppcoreguidelines-use-default-member-init`, which is an alias to `modernize-user-default-member-init`.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVMuO4zYQ_Brq0pBAUbLWPugwGcNArsn-AEW2xd5QpMDHGJ6vDyiNdzxBNkAukkiwq6u6SpQx0uwQR3b4jR3OlczJ-DAqGayPs7Rv-L5Wk9f38buhCMqg-gtoWS0u6FIEASFbjKx7gdemP4J0unycmn1JEaSN_rMCNUx3YANfvMbg6B3rHLHWeJXZpnrBZcJQk6PEBt7Ad4NALmFw0oL1MynwV0gGH0xcCl5nhREkJJpNAo0rOo1O3SH57ehzNzbwvZSJV7gZUqZwzE5jpCAni1vPgD-ZK68RdF4tKZnIOyAHk09mR4kN42fGX_ZnYVuAZgdrIKdotVj4KivdXCfS94-qgp6MTI-lLA3dg3kqNSiVAZ8MhsK0jJUiOJ8gYFy9izSRpXT_Oo7dvaIbXcwBQVr76OFXDDIh3NDaIkJ59yM7tWm6UfpoBgljig08y_ozzzPGYt1N3uHqw00GzbqX5zNMvMAfuPg33I2_Br-Uwat1VT7gnEmjJYexXgNeMTw7TdLSOwY28E1q3CnKuLP3ZfZu_k8zm08Svz-StsWwoPwri1-H7kswpANpScbS_Z-hDb9K7fNcKj12-tSdZIVjOxzboTuduKjM2EuOx-Eb8q5Hfpo63Z6ux8M3NeiraDvRVjQKLjret0PL27YXzfXY9_zYHo4dF-qIE-s5LpJsY-3b0vgwVxRjxnEQ7dBXVk5o4_ZbC_EZQCYEE69ly2uslUXp8lo2D-cqjAWpnvIcWc8tlSD8xE6U7HZLPGEdzvA__AWzzdHDIt39a4wJY5WDHU1Ka7lLmLgwcZkpmTw1yi9MXAqRj1e9Bv8DVWLisimOTFw20X8HAAD__9V7n5s">