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

    <tr>
        <th>Summary</th>
        <td>
            [ADT] APSInt::getExtValue() - assumes signed bounds
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            llvm:support
      </td>
    </tr>

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

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

<pre>
    This was noticed on D139683 by @DataCorrupted 
```
  /// Get the correctly-extended \c int64_t value.
  int64_t getExtValue() const {
 assert(getMinSignedBits() <= 64 && "Too many bits for int64_t");
 return isSigned() ? getSExtValue() : getZExtValue();
  }
```
For the unsigned case we should be asserting `getActiveBits() <= 64` instead
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUsGOmzAQ_ZrhMkpkbDDhwIFdmqqqKlXNqodeKgMTcEXsyB52N39fQZKu2q40EuJ55nne8zMx2sERVZA_QN4kZubRh-rb54M9eZe0vr9UT6ON-GIiOs-2ox69wyZVpd4pbC8ImWgMm0cfwnxm6hFEA6IGLW61_iKC3F8LPxIjj4SdD4E6ni4bemVy_TKbP3ZoHevsJ-OzmWba3ufv6ED84ZW_L2cgdyBL7LyLjFA83FpNjBQY5G4g_mLdYVHYP1iOt35Qj6Aa1BmC1CA1gpRP3uPJuAu2liMefbjfB1KCLEHdyQPxHBzaeKX9Q7lfFjv8sxmoeoF__A2_kSEUzbt27X1YLZrd-j49diYSvhDG0c9Tjy3dVFo3IGgxENcd22d6TyZogdZFJtMnfaX6UpUmoSrVRSrSTOyyZKx00R1Vp3ZqV6iyk1Lo7NgXndCS0qLMy8RWUkiZyjRLhcqybGtSnZPI01IftTjmEjJBJ2On7TQ9n7Y-DImNcaYqL_M0TybT0hTXmEm5dICq43w--7A6nDdJqBZ4085DhExMNnJ8o2LL0xrSunmCvMH66-GTY1A1qPr_QGwWc-YTRby51_rZ9TGZw1SNzOe4DK5ZHCyPc7vt_Ankfl3r-tmcg_9FHYPcryoiyP0q5HcAAAD__xoR9c8">