[PATCH] D97955: [clang-tidy] Refactor loop-convert to bring most of the checking into matchers
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 4 08:20:33 PST 2021
njames93 created this revision.
njames93 added reviewers: aaron.ballman, alexfh.
Herald added a subscriber: xazax.hun.
njames93 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Move all checking on the for loop declaration into the matchers.
Once a match is generated clients only need to examine the body of the for loop to ensure its convertible.
This also brings the handling of match results for Iterator and PseudoArray loops much more inline.
This supercedes D97889 <https://reviews.llvm.org/D97889>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97955
Files:
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-basic.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97955.328183.patch
Type: text/x-patch
Size: 21734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210304/63fe1a5a/attachment-0001.bin>
More information about the cfe-commits
mailing list