summaryrefslogtreecommitdiffstats
path: root/test/loop-convert/array.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix tests to be more robust (to older versions of grep, lesser lit-like test ↵David Blaikie2012-08-311-8/+7
| | | | | | | | | | | | | | | | | | | | | | | runners, etc) Seems I had a problem with my version of grep, when run by lit, not supporting the \s escape. This seems to fix it for me & I'll be getting the buildbots to run these tests too to keep an eye on them (actually loop-convert tests still fail when run via a make build, so that'll be addressed in a future commit). I could use [[:space:]] to generalize over other whitespace but that seemed unnecessarily verbose when the flexibility wasn't actually required by the current text of the tests. Also I just simplified a lot of the loop-convert tests (removing the unecessary temp file deletion at the start, removing the unnecessary && for FileCheck, etc). The remove-cstr-calls/basic.cpp changes were necessitated by an out of tree lit-like test runner that's a bit less fantastic about escaping. They were modeled on existing tooling test cases in Clang, with thanks to Manuel Klimek for the pointers. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@163009 91177308-0d34-0410-b5e6-96231b3b80d8
* loop-convert, a C++11 for loop modernizerSam Panzer2012-08-241-0/+156
A new Clang-based tool which converts for loops to use the range-based syntax new to C++11. Three kinds of loops can be converted: - Loops over statically allocated arrays - Loops over containers, using iterators - Loops over array-like containers, using operator[] and at() Each transformation is assigned a confidence level by the tool. The minimum require confidence level to actually apply the transformation can be specified on the command line, but the default level should be fine for most code. Like other tools based on RefactoringTool, it is easiest to use this tool with a compilation database. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@162627 91177308-0d34-0410-b5e6-96231b3b80d8