diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-09 03:40:28 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-09 03:40:28 +0000 |
commit | 8a0f15592b08cdcbeb9f0e9d5684bacdedfb6473 (patch) | |
tree | d5c6a6e6f5edaf9abee5780730d10f5c38aa107f | |
parent | 432a4558b8161c362efc319f8a38e074e74da201 (diff) |
Document the updated behaviour of __builtin_constant_p introduced in r146236.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146241 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/InternalsManual.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/InternalsManual.html b/docs/InternalsManual.html index c22b1e8d91..46041c4711 100644 --- a/docs/InternalsManual.html +++ b/docs/InternalsManual.html @@ -1692,7 +1692,10 @@ interacts with constant evaluation:</p> any evaluatable subexpression to be accepted as an integer constant expression.</li> <li><b><tt>__builtin_constant_p</tt></b>: This returns true (as a integer - constant expression) if the operand is any evaluatable constant. As a + constant expression) if the operand evaluates to either a numeric value + (that is, not a pointer cast to integral type) of integral, enumeration, + floating or complex type, or if it evaluates to the address of the first + character of a string literal (possibly cast to some other type). As a special case, if <tt>__builtin_constant_p</tt> is the (potentially parenthesized) condition of a conditional operator expression ("?:"), only the true side of the conditional operator is considered, and it is evaluated @@ -1707,7 +1710,9 @@ interacts with constant evaluation:</p> floating-point literal.</li> <li><b><tt>__builtin_abs,copysign,..</tt></b>: These are constant folded as general constant expressions.</li> -<li><b><tt>__builtin_strlen</tt></b> and <b><tt>strlen</tt></b>: These are constant folded as integer constant expressions if the argument is a string literal.</li> +<li><b><tt>__builtin_strlen</tt></b> and <b><tt>strlen</tt></b>: These are + constant folded as integer constant expressions if the argument is a string + literal.</li> </ul> |