]> granicus.if.org Git - clang/commit
[refactor] initial support for refactoring action rules
authorAlex Lorenz <arphaman@gmail.com>
Mon, 28 Aug 2017 11:12:05 +0000 (11:12 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 28 Aug 2017 11:12:05 +0000 (11:12 +0000)
commit9905d839c761a14e3395dc2dbc90e47709acdd45
treee216ccd9629a72a37eac30c5cf74a586b7c05444
parent424d9c2dea7aa4719ec2fc9dacd26ae80924cb97
[refactor] initial support for refactoring action rules

This patch implements the initial support for refactoring action rules. The
first rule that's supported is a "source change" rule that returns a set of
atomic changes. This patch is based on the ideas presented in my RFC:

http://lists.llvm.org/pipermail/cfe-dev/2017-July/054831.html

The following pieces from the RFC are added by this patch:

- `createRefactoringRule` (known as `apply` in the RFC)
- `requiredSelection` refactoring action rule requirement.
- `selection::SourceSelectionRange` selection constraint.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311884 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/clang/Basic/LLVM.h
include/clang/Tooling/Refactoring/AtomicChange.h
include/clang/Tooling/Refactoring/RefactoringActionRule.h [new file with mode: 0644]
include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h [new file with mode: 0644]
include/clang/Tooling/Refactoring/RefactoringActionRuleRequirementsInternal.h [new file with mode: 0644]
include/clang/Tooling/Refactoring/RefactoringActionRules.h [new file with mode: 0644]
include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h [new file with mode: 0644]
include/clang/Tooling/Refactoring/RefactoringRuleContext.h [new file with mode: 0644]
include/clang/Tooling/Refactoring/SourceSelectionConstraints.h [new file with mode: 0644]
lib/Tooling/Refactoring/CMakeLists.txt
lib/Tooling/Refactoring/SourceSelectionConstraints.cpp [new file with mode: 0644]
unittests/Tooling/CMakeLists.txt
unittests/Tooling/RefactoringActionRulesTest.cpp [new file with mode: 0644]