[PATCH] D131985: clang-tidy: strip useless parens from `return` statements

Oleg Smolsky via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 18:19:38 PDT 2022


oleg.smolsky updated this revision to Diff 454149.
oleg.smolsky added a comment.

Simplify and generalize the AST matcher. We just want to find all `return` statements in function definitions.


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

https://reviews.llvm.org/D131985

Files:
  clang-tools-extra/clang-tidy/readability/CMakeLists.txt
  clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
  clang-tools-extra/clang-tidy/readability/ReturnWithRedundantParensCheck.cpp
  clang-tools-extra/clang-tidy/readability/ReturnWithRedundantParensCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/readability/return-with-redundant-parens.rst
  clang-tools-extra/test/clang-tidy/readability-return-with-redundant-parens.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131985.454149.patch
Type: text/x-patch
Size: 9735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220820/01782fd1/attachment.bin>


More information about the cfe-commits mailing list