This patch allows clang-tidy to replace traditional for-loops where the
container type inherits its begin/end methods from a base class.
Test plan: Added unit test cases that confirm the tool replaces the new
pattern.
Paths
| Differential D140307
[clang-tidy] Match derived types in in modernize-loop-convert ClosedPublic Authored by ccotter on Dec 19 2022, 7:30 AM.
Details Summary This patch allows clang-tidy to replace traditional for-loops where the Test plan: Added unit test cases that confirm the tool replaces the new
Diff Detail
Event Timelineccotter retitled this revision from Match derived types in in modernize-loop-convert to [clang-tidy] Match derived types in in modernize-loop-convert.Dec 29 2022, 7:44 AM ccotter added inline comments.
This revision is now accepted and ready to land.Jan 6 2023, 2:26 AM Comment Actions Hi! I'm finding merge conflicts when rebasing the patch on latest trunk, would you mind uploading a rebased version? Thanks! Comment Actions Rebased! Sorry for the multiple diffs on this phab - I'm still getting the hang of arc diff. Closed by commit rGe43295209bb8: [clang-tidy] Match derived types in in modernize-loop-convert (authored by ccotter, committed by carlosgalvezp). · Explain WhyJan 10 2023, 8:08 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 487781 clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
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
|
clang-format not found in user’s local PATH; not linting file.