summaryrefslogtreecommitdiff
path: root/clang-tools-extra/docs
diff options
context:
space:
mode:
authorJonas Toth <jonas.toth@gmail.com>2018-10-12 17:36:04 +0000
committerJonas Toth <jonas.toth@gmail.com>2018-10-12 17:36:04 +0000
commit14a60d0215ba609e42c76f7772690996725c2560 (patch)
tree23cf9ce9de7b617b1b44c9397ff508d01825046b /clang-tools-extra/docs
parent0d28a5a5100efcf1893807464a83ce2b54417d64 (diff)
[doc] fix markup in clang-tidy bugprone-not-null-terminated-result
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/bugprone-not-null-terminated-result.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-not-null-terminated-result.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-not-null-terminated-result.rst
index 72f465819ba..9a0ce54c569 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-not-null-terminated-result.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-not-null-terminated-result.rst
@@ -55,11 +55,11 @@ Rewrite to a string handler function is not possible:
Rewrite based on the destination array:
-- If copy to the destination array cannot *overflow then the new function should
+- If copy to the destination array cannot overflow then the new function should
be the older copy function (ending with ``cpy``), because it is more
efficient than the safe version.
-- If copy to the destination array can *overflow and
+- If copy to the destination array can overflow and
``AreSafeFunctionsAvailable`` is set to ``Yes``, ``y`` or non-zero and it is
possible to obtain the capacity of the destination array then the new function
could be the safe version (ending with ``cpy_s``).
@@ -67,7 +67,7 @@ Rewrite based on the destination array:
- If the new function is could be safe version and C++ files are analysed then
the length of the destination array can be omitted.
-- *It is possible to overflow:
+- It is possible to overflow:
- Unknown the capacity of the destination array.
- If the given length is equal to the destination capacity.
@@ -95,17 +95,21 @@ Memory handler functions
:ref:`Transformation rules of 'memcpy()'<MemcpyTransformation>` section.
- ``memchr``:
+
- Usually there is a C-style cast, and it is needed to be removed, because the
new function ``strchr``'s return type is correct.
- Also the given length is not needed in the new function.
- ``memmove``:
+
- If safe functions are available the new function is ``memmove_s``, it has
four arguments:
+
- destination array,
- length of the destination array,
- source string,
- length of the source string which is incremented by one.
+
- If safe functions are not available the given length is incremented by one.
- ``memmove_s``: given length is incremented by one.