[PATCH] D39367: [clang-tidy] Add support for operator new[] in check bugprone-misplaced-operator-in-strlen-in-alloc
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 27 02:20:59 PDT 2017
baloghadamsoftware created this revision.
Herald added a subscriber: rnkovacs.
The check now recognizes error cases like `new char[strlen(s + 1)]` and suggests a fix in the format `new char[strlen(s) + 1]`.
https://reviews.llvm.org/D39367
Files:
clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
docs/ReleaseNotes.rst
docs/clang-tidy/checks/bugprone-misplaced-operator-in-strlen-in-alloc.rst
test/clang-tidy/bugprone-misplaced-operator-in-strlen-in-alloc.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39367.120563.patch
Type: text/x-patch
Size: 4798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171027/79a3e98c/attachment-0001.bin>
More information about the cfe-commits
mailing list