summaryrefslogtreecommitdiffstats
path: root/clang/docs/UndefinedBehaviorSanitizer.rst
diff options
context:
space:
mode:
Diffstat (limited to 'clang/docs/UndefinedBehaviorSanitizer.rst')
-rw-r--r--clang/docs/UndefinedBehaviorSanitizer.rst18
1 files changed, 11 insertions, 7 deletions
diff --git a/clang/docs/UndefinedBehaviorSanitizer.rst b/clang/docs/UndefinedBehaviorSanitizer.rst
index 2456f5040d4..7a4eaf4f60d 100644
--- a/clang/docs/UndefinedBehaviorSanitizer.rst
+++ b/clang/docs/UndefinedBehaviorSanitizer.rst
@@ -83,9 +83,13 @@ Available checks are:
type.
- ``-fsanitize=float-cast-overflow``: Conversion to, from, or
between floating-point types which would overflow the
- destination.
+ destination. Because the range of representable values for all
+ floating-point types supported by Clang is [-inf, +inf], the only
+ cases detected are conversions from floating point to integer types.
- ``-fsanitize=float-divide-by-zero``: Floating point division by
- zero.
+ zero. This is undefined per the C and C++ standards, but is defined
+ by Clang (and by ISO/IEC/IEEE 60559 / IEEE 754) as producing either an
+ infinity or NaN value, so is not included in ``-fsanitize=undefined``.
- ``-fsanitize=function``: Indirect call of a function through a
function pointer of the wrong type (Darwin/Linux, C++ and x86/x86_64
only).
@@ -163,8 +167,8 @@ Available checks are:
You can also use the following check groups:
- ``-fsanitize=undefined``: All of the checks listed above other than
- ``unsigned-integer-overflow``, ``implicit-conversion`` and the
- ``nullability-*`` group of checks.
+ ``float-divide-by-zero``, ``unsigned-integer-overflow``,
+ ``implicit-conversion``, and the ``nullability-*`` group of checks.
- ``-fsanitize=undefined-trap``: Deprecated alias of
``-fsanitize=undefined``.
- ``-fsanitize=implicit-integer-truncation``: Catches lossy integral
@@ -174,16 +178,16 @@ You can also use the following check groups:
conversions that change the arithmetic value of the integer. Enables
``implicit-signed-integer-truncation`` and ``implicit-integer-sign-change``.
- ``-fsanitize=implicit-conversion``: Checks for suspicious
- behaviour of implicit conversions. Enables
+ behavior of implicit conversions. Enables
``implicit-unsigned-integer-truncation``,
- ``implicit-signed-integer-truncation`` and
+ ``implicit-signed-integer-truncation``, and
``implicit-integer-sign-change``.
- ``-fsanitize=integer``: Checks for undefined or suspicious integer
behavior (e.g. unsigned integer overflow).
Enables ``signed-integer-overflow``, ``unsigned-integer-overflow``,
``shift``, ``integer-divide-by-zero``,
``implicit-unsigned-integer-truncation``,
- ``implicit-signed-integer-truncation`` and
+ ``implicit-signed-integer-truncation``, and
``implicit-integer-sign-change``.
- ``-fsanitize=nullability``: Enables ``nullability-arg``,
``nullability-assign``, and ``nullability-return``. While violating
OpenPOWER on IntegriCloud