summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-move/ClangMove.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-move] Better support enclosing class.Haojian Wu2016-10-131-6/+32
| | | | | | | | | | | | | | | Summary: * When moving an outermost enclosing class, all its nested classes should also be moved together. * Add a test for not moving nested class. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25369 llvm-svn: 284111
* Recommit r283538 "[clang-move] Support moving multiple classes in one run."Haojian Wu2016-10-131-5/+17
| | | | llvm-svn: 284109
* [clang-move] Compare with real paths of symlinksHaojian Wu2016-10-121-9/+22
| | | | | | | | | | | | Summary: MakeAbsolutePath does wrong things with symlinks previously. When comparing with a symlink, we need to compare with the real path of it. This fixes issues when the build directory is a symlink. Reviewers: ioeric Subscribers: beanz, mgorny, cfe-commits, bkramer Differential Revision: https://reviews.llvm.org/D25508 llvm-svn: 284020
* Revert "[clang-move] Support moving multiple classes in one run."Renato Golin2016-10-071-17/+5
| | | | | | | | | | | This reverts commit r283526 et al as it keeps randomly breaking bots, even after the commit has gone, on other people's commit ranges. Revert "[clang-move] Simplify lint tests" (r283545). Revert "Fix buildbot error." (r283534). Revert "Revert "fix buildbot error" since it is not right fix." (r283538). llvm-svn: 283553
* [clang-move] Support moving multiple classes in one run.Haojian Wu2016-10-071-5/+17
| | | | | | | | | | Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25309 llvm-svn: 283526
* [clang-move] Move comments which are associated with the moved class.Haojian Wu2016-10-061-26/+67
| | | | | | | | | | Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25227 llvm-svn: 283425
* [clang-move] Cleanup around replacements.Haojian Wu2016-10-061-8/+23
| | | | | | | | | | | | | | Summary: cleanup the remaining empty namespace after moving out the class defintitions. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25282 llvm-svn: 283424
* Fix windows builtbot error.Haojian Wu2016-10-041-0/+2
| | | | llvm-svn: 283205
* [clang-move] Make it support both relative and absolute file path arguments.Haojian Wu2016-10-041-19/+83
| | | | | | | | | | Reviewers: ioeric Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24922 llvm-svn: 283202
* [clang-move] Use isStaticStorageClass matcher.Haojian Wu2016-09-271-9/+3
| | | | llvm-svn: 282477
* [clang-move] The new.cc file should include new_header.h instead of old_header.hHaojian Wu2016-09-231-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, all #includes (includeing old_header.h) in old.cc will be copied to new.cc, however, the new.cc should include new_header.h instead of the old_header.h Before applying the patch, the new.cc looks like: ``` #include "old_header.h" ... ``` The new.cc looks like with this patch: ``` #include "new_header" ... ``` Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24828 llvm-svn: 282247
* [clang-move] A prototype tool for moving class definition to new file.Haojian Wu2016-09-211-0/+339
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 llvm-svn: 282070
OpenPOWER on IntegriCloud