summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-move/tool/ClangMoveMain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make clang-move use same file naming convention as other toolsNico Weber2019-03-221-212/+0
| | | | | | | | | | | | In all the other clang-foo tools, the main library file is called Foo.cpp and the file in the tool/ folder is called ClangFoo.cpp. Do this for clang-move too. No intended behavior change. Differential Revision: https://reviews.llvm.org/D59700 llvm-svn: 356780
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [clang-move] Fix broken json output.Eric Liu2018-10-091-3/+4
| | | | llvm-svn: 344055
* [clang-move] Dump whether a declaration is templated.Eric Liu2018-10-081-2/+4
| | | | llvm-svn: 343982
* [FileSystem] Split up the OpenFlags enumeration.Zachary Turner2018-06-071-2/+2
| | | | | | | | | | | | | | | | | This breaks the OpenFlags enumeration into two separate enumerations: OpenFlags and CreationDisposition. The first controls the behavior of the API depending on whether or not the target file already exists, and is not a flags-based enum. The second controls more flags-like values. This yields a more easy to understand API, while also allowing flags to be passed to the openForRead api, where most of the values didn't make sense before. This also makes the apis more testable as it becomes easy to enumerate all the configurations which make sense, so I've added many new tests to exercise all the different values. llvm-svn: 334221
* [clang-move] Create ClangMoveActionFactory on stackAlexander Shaposhnikov2017-04-141-4/+3
| | | | | | | | | | | This diff removes unnecessary using of unique_ptr with ClangMoveActionFactory (pico cleanup). NFC Test plan: make check-clang-tools Differential revision: https://reviews.llvm.org/D32063 llvm-svn: 300356
* [clang-move] Fix buildbot failuresAlexander Shaposhnikov2016-12-121-1/+2
| | | | | | Fix the buildbot failures introduced by D27669 llvm-svn: 289465
* [clang-move] Use appendArgumentsAdjuster for adding extra argumentsAlexander Shaposhnikov2016-12-121-25/+17
| | | | | | | | | | | 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
* [clang-move] don't miss ',' in json output when there are duplicate elements.Eric Liu2016-12-031-10/+8
| | | | llvm-svn: 288586
* [clang-move] Enable dump all declarations in old header.Haojian Wu2016-11-241-3/+31
| | | | | | | | | | | | | | | | | | | 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
* [clang-move] Add some options allowing to add old/new.h to new/old.h ↵Haojian Wu2016-11-231-0/+23
| | | | | | | | | | | | | | | | respectively. 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
* [clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang2016-11-081-3/+3
| | | | | | | | | | | | | | | | Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
* [clang-move] Use cl::list for the list of namesAlexander Shaposhnikov2016-10-141-5/+5
| | | | | | | | | | 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
* [clang-move] error out when fail to create new files.Eric Liu2016-10-131-4/+16
| | | | llvm-svn: 284155
* Print stack trace for clang-move tool.Eric Liu2016-10-131-1/+3
| | | | llvm-svn: 284148
* Recommit r283538 "[clang-move] Support moving multiple classes in one run."Haojian Wu2016-10-131-3/+5
| | | | llvm-svn: 284109
* Revert "[clang-move] Support moving multiple classes in one run."Renato Golin2016-10-071-5/+3
| | | | | | | | | | | 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-3/+5
| | | | | | | | | | 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-1/+13
| | | | | | | | | | Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25227 llvm-svn: 283425
* [clang-move] Cleanup around replacements.Haojian Wu2016-10-061-1/+1
| | | | | | | | | | | | | | 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
* [clang-move] Make it support both relative and absolute file path arguments.Haojian Wu2016-10-041-9/+24
| | | | | | | | | | Reviewers: ioeric Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24922 llvm-svn: 283202
* [clang-move] A prototype tool for moving class definition to new file.Haojian Wu2016-09-211-0/+126
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