diff options
author | Christopher Di Bella <cjdb@google.com> | 2021-02-26 00:11:25 +0000 |
---|---|---|
committer | Christopher Di Bella <cjdb@google.com> | 2021-03-04 17:00:54 +0000 |
commit | 9830901b341cfb884cdef00e0335c6e3e62d107a (patch) | |
tree | 824f62242dd84e9b428110a1bc93a4dc9d79b4a1 /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 72abc9bf07a9e1a67671edf49e0f69734ad08151 (diff) | |
download | llvm-9830901b341cfb884cdef00e0335c6e3e62d107a.zip llvm-9830901b341cfb884cdef00e0335c6e3e62d107a.tar.gz llvm-9830901b341cfb884cdef00e0335c6e3e62d107a.tar.bz2 |
[clang] removes check against integral-to-pointer conversion...
... unless it's a literal
D94640 was a bit too aggressive in its analysis, considering integers
representing valid addresses as invalid. This change rolls back some of
the check, so that only the most obvious case is still flagged.
Before:
```cpp
free((void*)1000); // literal converted to `void*`: warning good
free((void*)an_int); // `int` object converted to `void*`: warning might
// be a false positive
```
After
```cpp
free((void*)1000); // literal converted to `void*`: warning good
free((void*)an_int); // doesn't warn
```
Differential Revision: https://reviews.llvm.org/D97512
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions