]> granicus.if.org Git - clang/commitdiff
[docs] UndefinedBehaviorSanitizer.rst: {,un}signed-integer-overflow: tune docs
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 30 Jul 2018 21:11:32 +0000 (21:11 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 30 Jul 2018 21:11:32 +0000 (21:11 +0000)
Yes, i erroneously assumed that the "after" was meant,
but i was wrong:
> I really meant "performed before", for cases like 4u / -2,
> where -2 is implicitly converted to UINT_MAX - 2 before
> the computation. Conversions that are performed after
> a computation aren't part of the computation at all,
> so I think it's much clearer that they're not in scope
> for this sanitizer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338306 91177308-0d34-0410-b5e6-96231b3b80d8

docs/UndefinedBehaviorSanitizer.rst

index 6cf53f568339a8a848535d0f7fa3fd40e900e5f0..86d0193a23c25d144f6ef92e2b5b1aad229210ea 100644 (file)
@@ -131,7 +131,7 @@ Available checks are:
      result of a signed integer computation cannot be represented in its type.
      This includes all the checks covered by ``-ftrapv``, as well as checks for
      signed division overflow (``INT_MIN/-1``), but not checks for
-     lossy implicit conversions performed after the computation
+     lossy implicit conversions performed before the computation
      (see ``-fsanitize=implicit-conversion``). Both of these two issues are
      handled by ``-fsanitize=implicit-conversion`` group of checks.
   -  ``-fsanitize=unreachable``: If control flow reaches an unreachable
@@ -140,7 +140,7 @@ Available checks are:
      the result of an unsigned integer computation cannot be represented in its
      type. Unlike signed integer overflow, this is not undefined behavior, but
      it is often unintentional. This sanitizer does not check for lossy implicit
-     conversions performed after such a computation
+     conversions performed before such a computation
      (see ``-fsanitize=implicit-conversion``).
   -  ``-fsanitize=vla-bound``: A variable-length array whose bound
      does not evaluate to a positive value.