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

    <tr>
        <th>Summary</th>
        <td>
            constexpr-unknown allows illegal pointer arithmetic
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          efriedma-quic
      </td>
    </tr>
</table>

<pre>
    ```
constexpr int f() { int &a = a; return &a+3-&a; }
constexpr int z = f();
```

Currently accepted with -std=c++23.  Should be rejected: the pointer arithmetic is nonsense.

CC @shafik @frederick-vs-ja
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsUVuu2yAUXM3xD7JlDn7lgw_7RtlAV4Dh2OaGQAo46e3qq1hRW6mVkBiQ5qEZlZJdPZGEdoL2XKg9byFKWqIlc1Pl993qYg7mS0JXv0896uBTph_3yKzPbAEcAE8M-ul4A3aKgTgzBWJikfIe_fEJOInyAGJi0J__Ufp50N56ICaox79toR4_9hjJZ_fFlNZ0z2TY0-aNlSkbEGcNOAFOKCrGvm1hd4bNxCJ9ks5kQIwsb8TuwfpMkalo83ajbDWzifngE_lE1dvpg0FTp00t9vpCSyRD0epr-UjlpyqMFOYkTqogyfsGUbS84cUmG64GdWqapeNokOPQDUZrLQaj-3bmWFiJNba14D0fOCKv6rarceaD7gfqBDfQ1HRT1lXOPW5ViGthU9pJcsG7timcmsmlYzBE7ZRfQYxLDD6TN4D4mjHKF7ec9zVBUzubcvqjlm12JH83X-7-6sPTM-VceCZmnaNVuf-0VOzRyS3newIxAl4AL6vN2z5XOtwALy-H91XeY3iVDng5wifAyzv_Q-KvAAAA__-l0sP9">