1. Remove some boilerplate code for appending -fparse-all-comments to the list of arguments.
2. Run clang-format -i against ClangMoveMain.cpp.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D27669
llvm-svn: 289464
Summary:
* Add -dump_dels option to dump all declarations from old header. It
will allow clang-move used as a frontend to get declarations from
header. Further more, this will make debugging stuff easier. Currently only
class/function types are supported.
* Refactoring code a little bit by creating a ClangMoveContext which
holds all options for ClangMoveTool, which can simplify the code in
some degree.
Reviewers: ioeric
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27059
llvm-svn: 287863
Summary:
* --new_depend_on_old: new header will include old header
* --old_depend_on_new: old header will include new header.
Reviewers: ioeric
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26966
llvm-svn: 287752
This diff replaces manual parsing of the comma-separated list of names with
cl::list and cl::CommaSeparated.
Test plan: make -j8 check-clang-tools
Differential revision: https://reviews.llvm.org/D25586
llvm-svn: 284291
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
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
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