[PATCH] D28026: Explicitly state the behavior of inbounds with a null pointer.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 17:00:17 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL295916: Explicitly state the behavior of inbounds with a null pointer. (authored by efriedma).
Changed prior to commit:
https://reviews.llvm.org/D28026?vs=82252&id=89445#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28026
Files:
llvm/trunk/docs/LangRef.rst
Index: llvm/trunk/docs/LangRef.rst
===================================================================
--- llvm/trunk/docs/LangRef.rst
+++ llvm/trunk/docs/LangRef.rst
@@ -7734,8 +7734,10 @@
precise signed arithmetic are not an *in bounds* address of that
allocated object. The *in bounds* addresses for an allocated object are
all the addresses that point into the object, plus the address one byte
-past the end. In cases where the base is a vector of pointers the
-``inbounds`` keyword applies to each of the computations element-wise.
+past the end. The only *in bounds* address for a null pointer in the
+default address-space is the null pointer itself. In cases where the
+base is a vector of pointers the ``inbounds`` keyword applies to each
+of the computations element-wise.
If the ``inbounds`` keyword is not present, the offsets are added to the
base address with silently-wrapping two's complement arithmetic. If the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28026.89445.patch
Type: text/x-patch
Size: 936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170223/164eba74/attachment.bin>
More information about the llvm-commits
mailing list