[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 06:23:26 PDT 2017


aaron.ballman added a comment.

This upload looks considerably better, thank you!



================
Comment at: docs/ReleaseNotes.rst:63
+
+  Finds cases where ``1`` is added to the string in the parameter of
+  ``strlen()``, ``strnlen()``, ``strnlen_s()``, ``wcslen()``, ``wcsnlen()`` and
----------------
parameter of -> argument to


================
Comment at: docs/ReleaseNotes.rst:64
+  Finds cases where ``1`` is added to the string in the parameter of
+  ``strlen()``, ``strnlen()``, ``strnlen_s()``, ``wcslen()``, ``wcsnlen()`` and
+  ``wcsnlen_s()`` functions instead of to the result and use its return value as
----------------
and -> , and

(Add the Oxford comma.)


================
Comment at: docs/ReleaseNotes.rst:65
+  ``strlen()``, ``strnlen()``, ``strnlen_s()``, ``wcslen()``, ``wcsnlen()`` and
+  ``wcsnlen_s()`` functions instead of to the result and use its return value as
+  an argument of a memory allocation function (``malloc()``, ``calloc()``,
----------------
functions instead of to the result -> instead of the result

use its return value -> the value is used


================
Comment at: docs/ReleaseNotes.rst:66
+  ``wcsnlen_s()`` functions instead of to the result and use its return value as
+  an argument of a memory allocation function (``malloc()``, ``calloc()``,
+  ``realloc()``, ``alloca()``).
----------------
of a -> to a


================
Comment at: docs/clang-tidy/checks/bugprone-misplaced-operator-in-strlen-in-alloc.rst:6
+
+Finds cases where ``1`` is added to the string in the parameter of ``strlen()``,
+``strnlen()``, ``strnlen_s()``, ``wcslen()``, ``wcsnlen()`` and ``wcsnlen_s()``
----------------
Same wording changes from the release notes apply here as well.


================
Comment at: docs/clang-tidy/checks/bugprone-misplaced-operator-in-strlen-in-alloc.rst:31
+
+Example for silencing the bug report:
+
----------------
bug report -> diagnostic


https://reviews.llvm.org/D39121





More information about the cfe-commits mailing list