[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert
Chris Cotter via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 29 07:45:36 PST 2022
ccotter created this revision.
ccotter added a project: clang-tools-extra.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
ccotter requested review of this revision.
Herald added a subscriber: cfe-commits.
The modernize-loop-convert check will now match iterator based loops
that call the free functions 'begin'/'end', as well as matching the
free function 'size' on containers.
Test plan: Added unit test cases matching free function calls on
containers, and a single negative test case for length() which is not
supported.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140760
Files:
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/loop-convert/structures.h
clang-tools-extra/test/clang-tidy/checkers/modernize/loop-convert-basic.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140760.485616.patch
Type: text/x-patch
Size: 13478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221229/d7149655/attachment.bin>
More information about the cfe-commits
mailing list