[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 20 07:49:31 PDT 2017
Eugene.Zelenko added a comment.
Same mistake could be made with new[] operator.
================
Comment at: docs/clang-tidy/checks/list.rst:10
android-cloexec-creat
+ android-cloexec-dup
android-cloexec-epoll-create
----------------
I think will be better to fix order of other checks separately from this check.
================
Comment at: docs/clang-tidy/checks/misc-misplaced-operator-in-strlen-in-alloc.rst:7
+Finds cases a value is added to or subtracted from the string in the parameter
+of ``strlen()`` method instead of to the result and use its return value as an
+argument of a memory allocation function (``malloc()``, ``calloc()``,
----------------
strlen() is function, not method.
https://reviews.llvm.org/D39121
More information about the cfe-commits
mailing list