[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

Tristan Bourvon via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 28 10:45:09 PST 2018


tbourvon updated this revision to Diff 131709.
tbourvon added a comment.
Herald added a subscriber: hintonda.

Separated the added matcher and lexer utils into a different diff.
Also added unit tests to make sure we behave as expected when macros get in the way of the code we detect.


https://reviews.llvm.org/D37014

Files:
  clang-tidy/readability/CMakeLists.txt
  clang-tidy/readability/ReadabilityTidyModule.cpp
  clang-tidy/readability/UnnecessaryIntermediateVarCheck.cpp
  clang-tidy/readability/UnnecessaryIntermediateVarCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/readability-unnecessary-intermediate-var.rst
  test/clang-tidy/readability-unnecessary-intermediate-var.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37014.131709.patch
Type: text/x-patch
Size: 35842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180128/4c12a9b3/attachment-0001.bin>


More information about the cfe-commits mailing list