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

    <tr>
        <th>Summary</th>
        <td>
            Clang: sizeof-pointer-memaccess diagnostic missed
        </td>
    </tr>

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

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

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

<pre>
    https://godbolt.org/z/sfro4e8Wr

Gcc 16 catches multiple issues here whereas clang -Weverything doesn't report anything.  There is already an [issue ](
https://github.com/llvm/llvm-project/issues/64871
)opened for the format-truncation warning.  This issue is opened to track that clang missed the sizeof-pointer-memaccess issue:

warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk8FuqzwQhZ_GbEaJwAQMCxbpX_G_wJWyNvYE3GtsZA9p06e_spPqSpW6uBssbHzmO2cGGaOZHeLAmhfWvBZyp8WH4S0SutmicbOhZZ-Kyev7sBBtkdVnxkfGx9nryVs6-jAzPn4yPsZr8CfsLoGVZ1ae_1cKqhaUJLVghHW3ZDaLYGLcMcKCAeE9PWUEZaWb4XDBG4Y7LcbNoD1Gx7ggCLj5QCDd4-QI8CtfNhGkDSj1HaQD1rxkZWDNK-MdK8_feLOTo_Ir46O1t6_lsAX_hooYHx9kjI_tqRNVcsF7v6FDDVcfgBZM6yrpQGF3SpLxDt5lcF9UJj7cJbTnRfJAQarfQIukp8_VxJiOFoRoPtFfD5s3jjAcVlylUhifOgk-Z_kswuozyDDvKzpKyoyLhwDjAozL724LxlHeUdLahJILyRUBP7aAMSZs-djWGMm47ITVL6CNhrvfYUXpUoEt-JvRmPLFj80aZQgsupkWVo8p8sPlJwdpnPRQ677uZYFDJZq-a7tTdyqWAa9l001XUVedaNXU9W3bdm3foOhrqUVVmIGXvKnKUvCSV7w-NmVflrwVfaO16AWyU4mrNPaYWphmsMiBDVXL67YtrJzQxjzVnOfQGeeJKAy559M-R3YqrYkU_0qQIYvDf_nz-vxzb7SRs_ORjHq2stiD_f57_MO4PaFvA_8TAAD___5JMjg">