diff options
author | Nikita Popov <npopov@redhat.com> | 2025-04-17 12:44:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-17 12:44:57 +0200 |
commit | d69ee885cccecb49f0b288ec634186c35c8ecfb5 (patch) | |
tree | 2bf91409855aaca21365e305cb9a993ceb693b40 /clang/lib/AST/ByteCode/Compiler.cpp | |
parent | 6f91bfcc8aebe61ba4469c48270928f82ee89027 (diff) | |
download | llvm-d69ee885cccecb49f0b288ec634186c35c8ecfb5.zip llvm-d69ee885cccecb49f0b288ec634186c35c8ecfb5.tar.gz llvm-d69ee885cccecb49f0b288ec634186c35c8ecfb5.tar.bz2 |
[CaptureTracking] Remove dereferenceable_or_null special case (#135613)
Remove the special case where comparing a dereferenceable_or_null
pointer with null results in captures(none) instead of
captures(address_is_null).
This special case is not entirely correct. Let's say we have an
allocated object of size 2 at address 1 and have a pointer `%p` pointing
either to address 1 or 2. Then passing `gep p, -1` to a
`dereferenceable_or_null(1)` function is well-defined, and allows us to
distinguish between the two possible pointers, capturing information
about the address.
Now that we ignore address captures in alias analysis, I think we're
ready to drop this special case. Additionally, if there are regressions
in other places, the fact that this is inferred as address_is_null
should allow us to easily address them if necessary.
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
0 files changed, 0 insertions, 0 deletions