Issue 164959
Summary clang should not warn -Wshorten-64-to-32 when it knows shorten is safe
Labels clang
Assignees
Reporter rockeet
    ```c++
#include <limits.h>
unsigned int cvt(unsigned long x) {
    [[assume(x <= UINT_MAX)]];
    return x;
}
```
shorten is safe with `[[assume(x <= UINT_MAX)]];`.
see https://godbolt.org/z/aoPjxco5r
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to