<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/100687>100687</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Incorrect warning tautological-constant-out-of-range-compare
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LevoDeLellis
</td>
</tr>
</table>
<pre>
I see this issue using clang 18 on linux
Copy paste the below into main.cpp, compile with clang++ main.cpp, it'll claim the assert is always false yet when I run this it is not false
```
#include<cassert>
typedef unsigned long long u64;
enum E { a=1 };
E operator ~(E a) { return E(~u64(a)); }
int main() { assert(~a == ~1); }
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUk2OszgQPU2xKSUCmwBZsOg0idRSX8KYCnhkbGSXO5NNzj4CMj2aT7KM0Pvxq9JTMZrREbVwusCpy1TiyYf2m358R99krYlZ74dn-4WRCHkyEU2MiTBF40bUVrkRiwa9Q2tc-hvyDvKPT788cVGRVwlhT9Y_0Dj2OCvjjnpZQHyi9vNiLOHD8LQ7gbiAuPyPZBhEbe2Km3lzUzFSYDQRlX2oZ8S7spHwSYyPiRx-YUjuHXWjOc87Zw_3vqv8ffZfIY3TNg0E8lPvT4C87iA_Fxrojslt2xrQejfuV6pKkJedRi7NeEWoL6hAdgVC3f2CV_QLBcU-4AtEc0UF4rxxA3EKDq8gmtdqJ5oVWo-8bBab3jje9gKi-Vf4Timal0KQHcgOX8Wfut85s6GVw1meVUZtUYviXJVVWWVTW8iioDInLXV_v99PTd_XfT3UQ3kaat0MmWlFLsq8FlUuZV5WR3EqzycqqKRSFXVfQ5nTrIw9WvszH30Ys60jbZHnVVNnVvVk41YxIRw99gaBEGvjQruKDn0aI5S5NZHjfzZs2FL75bQPgTQjPlRwa-9YJfbWj0Yre9DeRVaODz7xwd8PQbmRDmu7VKAsBdtOzEsE-QHiBuI2Gp5Sf9R-BnFb33p_Dkvwf5FmELctYQRxe4_w04p_AgAA___A-vxx">