llvm-project/clang/unittests/Tooling
Alex Lorenz b54ef6a2a4 [refactor] add clang-refactor tool with initial testing support and
local-rename action

This commit introduces the clang-refactor tool alongside the local-rename action
which uses the existing renaming engine used by clang-rename. The tool
doesn't actually perform the source transformations yet, it just provides
testing support. This commit also moves only one test from clang-rename over to
test/Refactor. I will continue to move the other tests throughout
development of clang-refactor.

The following options are supported by clang-refactor:

-v: use verbose output
-selection: The source range that corresponds to the portion of the source
 that's selected (currently only special command test:<file> is supported).

Please note that a follow-up commit will migrate clang-refactor to
libTooling's common option parser, so clang-refactor will be able to use
the common interface with compilation database and options like -p, -extra-arg,
etc.

The testing support provided by clang-refactor is described below:

When -selection=test:<file> is given, clang-refactor will parse the selection
commands from that file. The selection commands are grouped and the specified
refactoring action invoked by the tool. Each command in a group is expected to
produce an identical result. The precise syntax for the selection commands is
described in a comment in TestSupport.h.

Differential Revision: https://reviews.llvm.org/D36574

llvm-svn: 313244
2017-09-14 10:06:52 +00:00
..
ASTSelectionTest.cpp Avoid 'size_t' typedef in the unittest ObjC code 2017-08-30 15:37:30 +00:00
CMakeLists.txt [refactor] initial support for refactoring action rules 2017-08-28 11:12:05 +00:00
CastExprTest.cpp Make CastExpr::getSubExprAsWritten look through implicit temporary under CK_ConstructorConversion 2017-06-27 08:19:09 +00:00
CommentHandlerTest.cpp Remove 'Filename' parameter from BeginSourceFileAction. 2017-06-09 01:36:10 +00:00
CompilationDatabaseTest.cpp [Tooling] FixedCompilationDatabase should be able to strip positional 2017-06-29 10:43:44 +00:00
DiagnosticsYamlTest.cpp Try to fix modules build 2017-07-15 00:29:25 +00:00
FixItTest.cpp [tooling] FixItHint Tooling refactoring 2016-05-11 14:31:39 +00:00
LexicallyOrderedRecursiveASTVisitorTest.cpp Replacing "or" with "||" to appease MSVC. 2017-09-06 15:12:05 +00:00
LookupTest.cpp Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC. 2017-06-15 21:01:24 +00:00
QualTypeNamesTest.cpp [Tooling] Add optional argument to getFullyQualifiedName to prepend "::". 2016-06-29 22:38:59 +00:00
RecursiveASTVisitorTest.cpp RecursiveASTVisitor should visit the nested name qualifiers in 2017-07-11 09:39:23 +00:00
RecursiveASTVisitorTestCallVisitor.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
RecursiveASTVisitorTestDeclVisitor.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
RecursiveASTVisitorTestExprVisitor.cpp Visit lambda capture inits from RecursiveASTVisitor::TraverseLambdaCapture(). 2016-08-17 14:59:53 +00:00
RecursiveASTVisitorTestTypeLocVisitor.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
RefactoringActionRulesTest.cpp [refactor] add clang-refactor tool with initial testing support and 2017-09-14 10:06:52 +00:00
RefactoringCallbacksTest.cpp Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks 2017-05-10 07:48:45 +00:00
RefactoringTest.cpp Added `applyAtomicChanges` function. 2017-07-31 09:22:34 +00:00
ReplacementTest.h clang-format: Separate out a language kind for ObjC. 2016-12-12 12:42:29 +00:00
ReplacementsYamlTest.cpp [clang-tidy] Add check name to YAML export 2017-01-03 14:35:47 +00:00
RewriterTest.cpp Implement tooling::Replacements as a class. 2016-08-01 10:16:37 +00:00
RewriterTestContext.h Roll-back r250822. 2015-10-20 13:23:58 +00:00
TestVisitor.h Recommit r312127: [refactor] AST selection tree should contain syntactic 2017-08-30 15:28:01 +00:00
ToolingTest.cpp Remove 'Filename' parameter from BeginSourceFileAction. 2017-06-09 01:36:10 +00:00