summaryrefslogtreecommitdiffstats
path: root/clang-move
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-move] A prototype tool for moving class definition to new file.Haojian Wu2016-09-215-0/+618
Summary: 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 ``` Reviewers: klimek, djasper, ioeric Subscribers: mgorny, beanz, Eugene.Zelenko, bkramer, omtcyfz, cfe-commits Differential Revision: https://reviews.llvm.org/D24243 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@282070 91177308-0d34-0410-b5e6-96231b3b80d8