]> granicus.if.org Git - clang/commit
Introducing clang::tooling::AtomicChange for refactoring tools.
authorEric Liu <ioeric@google.com>
Wed, 1 Mar 2017 13:14:01 +0000 (13:14 +0000)
committerEric Liu <ioeric@google.com>
Wed, 1 Mar 2017 13:14:01 +0000 (13:14 +0000)
commit912f198bafdc43d6a4229461eb4ff031a5d940c5
treea7aa71be6b99b8cb18e9793590d422345ff4da04
parent59d31eb1ffc704b402cf2dfa390461308c4bca08
Introducing clang::tooling::AtomicChange for refactoring tools.

Summary:
An AtomicChange is used to create and group a set of source edits, e.g.
replacements or header insertions. Edits in an AtomicChange should be related,
e.g. replacements for the same type reference and the corresponding header
insertion/deletion.

An AtomicChange is uniquely identified by a key position and will either be
fully applied or not applied at all. The key position should be the location
of the key syntactical element that is being changed, e.g. the call to a
refactored method.

Next step: add a tool that applies AtomicChange.

Reviewers: klimek, djasper

Reviewed By: klimek

Subscribers: alexshap, cfe-commits, djasper, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296616 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Tooling/Refactoring/AtomicChange.h [new file with mode: 0644]
lib/Tooling/CMakeLists.txt
lib/Tooling/Refactoring/AtomicChange.cpp [new file with mode: 0644]
lib/Tooling/Refactoring/CMakeLists.txt [new file with mode: 0644]
unittests/Tooling/CMakeLists.txt
unittests/Tooling/RefactoringTest.cpp