llvm-project/clang-tools-extra/test
Nathan James 8a548bc203
[clang-tidy] modernize-loop-convert reverse iteration support
Enables support for transforming loops of the form
```
for (auto I = Cont.rbegin(), E = Cont.rend(); I != E;++I)
```

This is done automatically in C++20 mode using `std::ranges::reverse_view` but there are options to specify a different function to reverse iterator over a container.
This is the first step, down the line I'd like to possibly extend this support for array based loops
```
for (unsigned I = Arr.size() - 1;I >=0;--I) Arr[I]...
```

Currently if you pass a reversing function with no header in the options it will just assume that the function exists, however as we have the ASTContext it may be as wise to check before applying, or at least lower the confidence level if we can't find it.

Reviewed By: alexfh

Differential Revision: https://reviews.llvm.org/D82089
2020-10-16 14:16:30 +01:00
..
Unit Add .py extension to clang-tools-extra lit cfg files 2019-03-29 02:46:31 +00:00
clang-apply-replacements [clang-apply-replacements] No longer deduplucates replacements from the same TU 2020-03-25 09:36:36 +00:00
clang-change-namespace Update redirected output file. 2020-06-19 23:30:16 -07:00
clang-doc [clang-doc] Improving Markdown Output 2020-03-06 17:37:08 -08:00
clang-include-fixer [lit] Fix another test case that r374652 missed 2019-10-16 23:58:58 +00:00
clang-move [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
clang-query clang-tidy and clang-query wont crash with invalid command line options 2020-05-31 17:41:29 +01:00
clang-reorder-fields
clang-tidy [clang-tidy] modernize-loop-convert reverse iteration support 2020-10-16 14:16:30 +01:00
modularize Revert r351208 (which was a revert of r350892). 2019-01-17 20:21:44 +00:00
pp-trace [pp-trace] Modernize the code 2019-03-24 06:55:08 +00:00
.clang-format
CMakeLists.txt [CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool 2020-09-25 13:32:56 +02:00
lit.cfg.py Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00
lit.site.cfg.py.in Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00