[PATCH] D66664: [FIX] Nonnull is not always implied by dereferenceable
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 14:49:17 PDT 2019
efriedma added a comment.
If you want to really expand out the meaning of "CanBeNull", it means "was the number of dereferenceable bytes computed using a dereferenceable_or_null attribute/metadata". It has nothing to do with whether a null pointer is generally valid in the given address space. The logic has always worked this way, since before it was extracted into a separate function in D17572 <https://reviews.llvm.org/D17572>.
getPointerDereferenceableBytes is not a good API, sure; if you want to refactor it, fine. But this patch just breaks it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66664/new/
https://reviews.llvm.org/D66664
More information about the llvm-commits
mailing list