[all-commits] [llvm/llvm-project] e43295: [clang-tidy] Match derived types in in modernize-l...

Chris Cotter via All-commits all-commits at lists.llvm.org
Tue Jan 10 08:08:45 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e43295209bb86e93008363c66c1277c7d8bb148c
      https://github.com/llvm/llvm-project/commit/e43295209bb86e93008363c66c1277c7d8bb148c
  Author: Chris Cotter <ccotter14 at bloomberg.net>
  Date:   2023-01-10 (Tue, 10 Jan 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/loop-convert/structures.h
    M clang-tools-extra/test/clang-tidy/checkers/modernize/loop-convert-basic.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list