[PATCH] D130630: [clang-tidy] Add readability-nested-ifs check
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 27 05:40:21 PDT 2022
njames93 created this revision.
njames93 added reviewers: alexfh, aaron.ballman.
Herald added subscribers: carlosgalvezp, xazax.hun, mgorny.
Herald added a project: All.
njames93 requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.
Add a check to detect nested if statements which can be combined into one by ANDing the conditions.
This reduces indentation making code easier to read.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130630
Files:
clang-tools-extra/clang-tidy/readability/CMakeLists.txt
clang-tools-extra/clang-tidy/readability/NestedIfsCheck.cpp
clang-tools-extra/clang-tidy/readability/NestedIfsCheck.h
clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/readability/nested-ifs.rst
clang-tools-extra/test/clang-tidy/checkers/readability/nested-ifs-cxx17.cpp
clang-tools-extra/test/clang-tidy/checkers/readability/nested-ifs.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130630.448012.patch
Type: text/x-patch
Size: 14219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220727/c4299de2/attachment-0001.bin>
More information about the cfe-commits
mailing list