diff options
author | Yutong Zhu <115899167+YutongZhuu@users.noreply.github.com> | 2025-03-10 09:08:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-10 14:08:50 +0100 |
commit | 773e88f9d61399c566fed45bf7858922f09b8063 (patch) | |
tree | 4ddc8c456565cd3299d9e51a902154bee8c51b63 /llvm/lib/CodeGen/MachineCopyPropagation.cpp | |
parent | a1a6a839763079b54d8910599549b9e6d4dd5fe6 (diff) | |
download | llvm-773e88f9d61399c566fed45bf7858922f09b8063.zip llvm-773e88f9d61399c566fed45bf7858922f09b8063.tar.gz llvm-773e88f9d61399c566fed45bf7858922f09b8063.tar.bz2 |
[Clang] Force expressions with UO_Not to not be non-negative (#126846)
This PR addresses the bug of not throwing warnings for the following
code:
```c++
int test13(unsigned a, int *b) {
return a > ~(95 != *b); // expected-warning {{comparison of integers of different signs}}
}
```
However, in the original issue, a comment mentioned that negation,
pre-increment, and pre-decrement operators are also incorrect in this
case.
Fixes #18878
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
0 files changed, 0 insertions, 0 deletions