[PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 6 01:50:17 PDT 2016
hokein created this revision.
hokein added a subscriber: cfe-commits.
This patch introduces a new tool which moves a specific class definition
from files (.h, .cc) to new files (.h, .cc), which mostly acts like
"Extract class defintion". In the long term, this tool should be
merged in to clang-refactoring as a subtool.
clang-move not only moves class definition, but also moves all the
forward declarations, functions defined in anonymous namespace and #include
headers to new files, to make sure the new files are compliable as much
as possible.
To move `Foo` from old.[h/cc] to new.[h/cc], use:
```
clang-move -name=Foo -old_header=old.h -old_cc=old.cc -new_header=new.h
-new_cc=new.cc old.cc
```
To move `Foo` from old.h to new.h, use:
```
clang-move -name=Foo -old_header=old.h -new_header=new.h old.cc
```
https://reviews.llvm.org/D24243
Files:
CMakeLists.txt
clang-move/CMakeLists.txt
clang-move/ClangMove.cpp
clang-move/ClangMove.h
clang-move/tool/CMakeLists.txt
clang-move/tool/ClangMoveMain.cpp
unittests/CMakeLists.txt
unittests/clang-move/CMakeLists.txt
unittests/clang-move/ClangMoveTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24243.70361.patch
Type: text/x-patch
Size: 30621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160906/4896dba0/attachment-0001.bin>
More information about the cfe-commits
mailing list