[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker
Barancsuk Lilla via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 31 05:01:06 PDT 2017
barancsuk updated this revision to Diff 113376.
barancsuk added a comment.
Major changes that have been made since the last update are as follows:
- It is checked, whether implicit type conversion is possible from the argument to the other parameter. The following conversion rules are considered:
- Arithmetic type conversions
- Pointer to pointer conversion (for multilevel pointers and also base/derived class pointers)
- Array to pointer conversion
- Function to function-pointer conversion
- CV-qualifier compatibility is checked as well.
- The calculation of a heuristic`s result and the comparison of this result with the corresponding threshold value are performed by the same method, the heuristic`s function.
- The heuristic`s function is called only if the heuristic itself is turned on by the configuration settings.
**Remark**:
Implicit conversion rules of C are not checked separately, because, as I experienced when testing the checker on a larger code base, deeming all pointers convertible results in several false positives.
https://reviews.llvm.org/D20689
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
clang-tidy/readability/SuspiciousCallArgumentCheck.h
docs/ReleaseNotes.rst
docs/clang-tidy/checks/list.rst
docs/clang-tidy/checks/readability-suspicious-call-argument.rst
test/clang-tidy/readability-suspicious-call-argument.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20689.113376.patch
Type: text/x-patch
Size: 46178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170831/419df488/attachment-0001.bin>
More information about the cfe-commits
mailing list