[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 10 07:57:19 PST 2021


whisperity updated this revision to Diff 329666.
whisperity edited the summary of this revision.
whisperity added reviewers: hokein, njames93.
whisperity added a comment.

- Massively refactored and modernised the implementation
- Removed spaghetti code related to the check options and made their storage and defaults clearer
- Fixed modelling issues that caused false positives around lambdas, overloaded call operators, recursive calls, enumconstant arguments
- Made the abbreviation dictionary for the //Abbreviations// heuristic a check-option
- Made the check message much more legible
- Fixed a severe modelling issue about not respecting or handling record types passed by copy (`CXXConstructExpr`)
- Wrote the documentation for real, including all heuristics, default values, options, etc. The original documentation was basically empty. For the docs, I used @varjujan's thesis (which subject was this check), which is unfortunately only available in Hungarian, but it helped me understand what some of the enums and the //Bound// doing on the inside.
- Thanks to having written a proper documentation, I also renamed a few symbols and check options to better tell what they are about.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D20689/new/

https://reviews.llvm.org/D20689

Files:
  clang-tools-extra/clang-tidy/readability/CMakeLists.txt
  clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
  clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
  clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst
  clang-tools-extra/test/clang-tidy/checkers/readability-suspicious-call-argument.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20689.329666.patch
Type: text/x-patch
Size: 62971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210310/4896bb91/attachment-0001.bin>


More information about the cfe-commits mailing list