[clang-tidy] Match derived types in in modernize-loop-convert
authorChris Cotter <ccotter14@bloomberg.net>
Tue, 10 Jan 2023 15:23:32 +0000 (15:23 +0000)
committerCarlos Galvez <carlosgalvezp@gmail.com>
Tue, 10 Jan 2023 16:08:25 +0000 (16:08 +0000)
commite43295209bb86e93008363c66c1277c7d8bb148c
treea21607e964226d210c28cee4a977937bc1a4da17
parentb05c71814c3b9f91a2e00af891d67a83790a109c
[clang-tidy] Match derived types in in modernize-loop-convert

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.

Reviewed By: carlosgalvezp

Differential Revision: https://reviews.llvm.org/D140307
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