[clang-tidy] Extend LoopConvert on array with `!=` comparison
authorNathan James <n.james93@hotmail.co.uk>
Thu, 4 Mar 2021 18:58:42 +0000 (18:58 +0000)
committerNathan James <n.james93@hotmail.co.uk>
Thu, 4 Mar 2021 18:58:59 +0000 (18:58 +0000)
commita85eb11129ce941e91b5bc3b188e469aaca4425f
tree7f43b18eb5380ab553d7ddc229ff15b0aeaaeada
parentf2b749be15688a8cebebdefe6b2be5a5dfaf5dd5
[clang-tidy] Extend LoopConvert on array with `!=` comparison

Enables transforming loops of the form:
```
for (int i = 0; I != container.size(); ++I) { container[I]...; }
for (int i = 0; I != N; ++I) { FixedArrSizeN[I]...; }
```

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D97940
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert-basic.cpp