
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
30 lines
853 B
CMake
30 lines
853 B
CMake
add_subdirectory(clang-apply-replacements)
|
|
add_subdirectory(clang-rename)
|
|
add_subdirectory(clang-reorder-fields)
|
|
add_subdirectory(modularize)
|
|
if(CLANG_ENABLE_STATIC_ANALYZER)
|
|
add_subdirectory(clang-tidy)
|
|
add_subdirectory(clang-tidy-vs)
|
|
endif()
|
|
|
|
add_subdirectory(change-namespace)
|
|
add_subdirectory(clang-query)
|
|
add_subdirectory(clang-move)
|
|
add_subdirectory(include-fixer)
|
|
add_subdirectory(pp-trace)
|
|
add_subdirectory(tool-template)
|
|
|
|
# Add the common testsuite after all the tools.
|
|
# TODO: Support tests with more granularity when features are off?
|
|
if(CLANG_ENABLE_STATIC_ANALYZER AND CLANG_INCLUDE_TESTS)
|
|
add_subdirectory(test)
|
|
add_subdirectory(unittests)
|
|
endif()
|
|
|
|
option(CLANG_TOOLS_EXTRA_INCLUDE_DOCS "Generate build targets for the Clang Extra Tools docs."
|
|
${LLVM_INCLUDE_DOCS})
|
|
if( CLANG_TOOLS_EXTRA_INCLUDE_DOCS )
|
|
add_subdirectory(docs)
|
|
endif()
|
|
|