summaryrefslogtreecommitdiffstats
path: root/docs/ControlFlowIntegrity.rst
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-02-01 18:55:50 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-02-01 18:55:50 +0000
commitf84c511056bc9cca4a50bbafaeb249e7a76ccd94 (patch)
tree150ebf6559807b8e274e33d34e0972e3f35e8f3a /docs/ControlFlowIntegrity.rst
parent20fa418bf12e4131731a7833358591f1d680fa45 (diff)
docs: Clarify that cfi-unrelated-cast is based on lifetime.
Also restore Makefile.sphinx which is needed to build the documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ControlFlowIntegrity.rst')
-rw-r--r--docs/ControlFlowIntegrity.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ControlFlowIntegrity.rst b/docs/ControlFlowIntegrity.rst
index 780ff882d0..c403610952 100644
--- a/docs/ControlFlowIntegrity.rst
+++ b/docs/ControlFlowIntegrity.rst
@@ -129,7 +129,8 @@ type ``void*`` or another unrelated type (which can be checked with
The difference between these two types of casts is that the first is defined
by the C++ standard to produce an undefined value, while the second is not
in itself undefined behavior (it is well defined to cast the pointer back
-to its original type).
+to its original type) unless the object is uninitialized and the cast is a
+``static_cast`` (see C++14 [basic.life]p5).
If a program as a matter of policy forbids the second type of cast, that
restriction can normally be enforced. However it may in some cases be necessary