Commit Graph

13 Commits

Author SHA1 Message Date
Edwin Vane c0b7be60f8 Unit test support for Clang extra tools
Added support to CMake and autoconf for unit tests in clang-tools-extra. A
dummy test exists for now until more meaningful tests can be written.

llvm-svn: 178661
2013-04-03 15:11:08 +00:00
Daniel Jasper 168ee99ffa Remove clang-format from clang-tools-extra.
llvm-svn: 177504
2013-03-20 09:52:50 +00:00
John Thompson 4f8ba659d9 Initial check in of Doug's modularize tool for checking header readiness for modules, plus some changes per review feedback: Removed system headers, changed to use stream output, added file name in message.
llvm-svn: 176847
2013-03-12 02:07:30 +00:00
Edwin Vane 86c63d94bb Removing loop-convert tool
cpp11-migrate now contains the loop convert transform code and tests.
Cleaning up the old code/tests and updating build system files as
necessary.

Reviewers: klimek
llvm-svn: 172074
2013-01-10 15:19:11 +00:00
Edwin Vane 9bd2e1bacc Initial commit for cpp11-migrate tool
- Added directory structures and build system files for the new tool.
- Extremely basic implementation of tool performs only an initial syntax check.
- Basic tests ensure syntax test works as expected.

llvm-svn: 169983
2012-12-12 14:30:57 +00:00
Daniel Jasper ff1491322e First version of a command line clang-format tool.
Reads a single source range (offset, length) as well as the style guide
as parameters and then reformats everything it receives from stdin.

llvm-svn: 169364
2012-12-05 09:01:09 +00:00
Sam Panzer 4cf99cfdc7 loop-convert, a C++11 for loop modernizer
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.

llvm-svn: 162627
2012-08-24 23:46:42 +00:00
Sam Panzer 8e0df501fa Reverted to correct commit this time.
llvm-svn: 162624
2012-08-24 23:29:33 +00:00
Sam Panzer 6d471a12db Reverted incorect partial commit of loop migrator. git-svn strikes again
llvm-svn: 162618
2012-08-24 23:02:27 +00:00
Sam Panzer 4483b0c56d For Loop Conversion
Loop Converter Skeleton - array-step-1

Added a check to loop increments - array-step-2b

Added a check on the loop's condition expression - array-step-2c

Finished array matcher - array-step-2

Retrieved matched nodes - array-step-3

Analysis for array loop indices - array-step-4

Added checking for naming and variable scope

Added confidence level and count-only command line args

Added aliased variable elision

Added support for iterator-based loops

Added support for single-iterator loops which call end() repeatedly

Added support for converting array-like containers

llvm-svn: 162610
2012-08-24 22:10:10 +00:00
Marshall Clow 2920ef43ef Rename directory from 'toolTemplate' to 'tool-template'
llvm-svn: 161887
2012-08-14 18:59:24 +00:00
Marshall Clow e16a45b3bc Added a tool template to make creating new tools simpler
llvm-svn: 161886
2012-08-14 18:53:39 +00:00
Chandler Carruth 118232f2b4 Add a root CMakeLists.txt and fix up all the test build stuff.
With this we can build and test the remove-cstr-calls tool which should
serve as a good example of how to add tools and their tests to the
repository.

llvm-svn: 161404
2012-08-07 08:33:04 +00:00