[PATCH] D24192: [clang-refactor] introducing clang-refactor

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 2 07:28:15 PDT 2016


omtcyfz created this revision.
omtcyfz added reviewers: alexfh, klimek, ioeric, bkramer.
omtcyfz added a subscriber: cfe-commits.

This patch basically creates `clang-refactor` binary and merges both `clang-rename rename-at` and `clang-rename rename-at` a.k.a. `clang-rename` into `clang-refactor rename` subcommand.

All USR processing routine is moved to `USREngine`, which should be reused by future potential submodules.

`clang-refactor` (as opposed to `clang-rename`) now uses LLVM policy about brackets around single line statements in `if`/`while`/...

Editor integrations are moved with minor changes, i.e. they are just named differently now.

Docs are updated.

The tool itself doesn't have to be perfect in the first iteration, so I would be really happy to push this one early enough so that everyone could start building modules on top of it. As soon as this one is landed more refactoring and cleanup patches are welcome. This also isn't about "the one true way how clang-refactor has to be designed". Thus said, consider this version of clang-refactor to be highly experimental.

https://reviews.llvm.org/D24192

Files:
  CMakeLists.txt
  TemplatedClassFunction.cpp
  clang-refactor/CMakeLists.txt
  clang-refactor/USREngine/CMakeLists.txt
  clang-refactor/USREngine/USRFinder.cpp
  clang-refactor/USREngine/USRFinder.h
  clang-refactor/USREngine/USRFindingAction.cpp
  clang-refactor/USREngine/USRFindingAction.h
  clang-refactor/USREngine/USRLocFinder.cpp
  clang-refactor/USREngine/USRLocFinder.h
  clang-refactor/driver/CMakeLists.txt
  clang-refactor/driver/ClangRefactorOptions.h
  clang-refactor/driver/Driver.cpp
  clang-refactor/driver/Rename.h
  clang-refactor/editor-integrations/CMakeLists.txt
  clang-refactor/editor-integrations/clang-refactor-rename.el
  clang-refactor/editor-integrations/clang-refactor-rename.py
  clang-refactor/modules/CMakeLists.txt
  clang-refactor/modules/rename/CMakeLists.txt
  clang-refactor/modules/rename/RenamingAction.cpp
  clang-refactor/modules/rename/RenamingAction.h
  clang-rename/CMakeLists.txt
  clang-rename/RenamingAction.cpp
  clang-rename/RenamingAction.h
  clang-rename/USRFinder.cpp
  clang-rename/USRFinder.h
  clang-rename/USRFindingAction.cpp
  clang-rename/USRFindingAction.h
  clang-rename/USRLocFinder.cpp
  clang-rename/USRLocFinder.h
  clang-rename/tool/CMakeLists.txt
  clang-rename/tool/ClangRename.cpp
  clang-rename/tool/clang-rename.el
  clang-rename/tool/clang-rename.py
  docs/clang-refactor/index.rst
  docs/clang-refactor/rename.rst
  docs/clang-rename.rst
  docs/index.rst
  test/CMakeLists.txt
  test/clang-refactor/rename/ClassAsTemplateArgument.cpp
  test/clang-refactor/rename/ClassFindByName.cpp
  test/clang-refactor/rename/ClassReplacements.cpp
  test/clang-refactor/rename/ClassSimpleRenaming.cpp
  test/clang-refactor/rename/ClassTestMulti.cpp
  test/clang-refactor/rename/ClassTestMultiByName.cpp
  test/clang-refactor/rename/ClassTestMultiByNameYAML.cpp
  test/clang-refactor/rename/ComplexFunctionOverride.cpp
  test/clang-refactor/rename/ComplicatedClassType.cpp
  test/clang-refactor/rename/Ctor.cpp
  test/clang-refactor/rename/CtorInitializer.cpp
  test/clang-refactor/rename/DeclRefExpr.cpp
  test/clang-refactor/rename/Field.cpp
  test/clang-refactor/rename/FunctionMacro.cpp
  test/clang-refactor/rename/FunctionOverride.cpp
  test/clang-refactor/rename/FunctionWithClassFindByName.cpp
  test/clang-refactor/rename/Inputs/ClassTestMultiByNameYAMLRenameAll.yaml
  test/clang-refactor/rename/Inputs/ClassTestMultiByNameYAMLRenameAt.yaml
  test/clang-refactor/rename/InvalidNewName.cpp
  test/clang-refactor/rename/MemberExprMacro.cpp
  test/clang-refactor/rename/Namespace.cpp
  test/clang-refactor/rename/NoNewName.cpp
  test/clang-refactor/rename/QualifiedNameNotFound.cpp
  test/clang-refactor/rename/TemplateClassInstantiation.cpp
  test/clang-refactor/rename/TemplateTypename.cpp
  test/clang-refactor/rename/UserDefinedConversion.cpp
  test/clang-refactor/rename/Variable.cpp
  test/clang-refactor/rename/VariableMacro.cpp
  test/clang-rename/ClassAsTemplateArgument.cpp
  test/clang-rename/ClassFindByName.cpp
  test/clang-rename/ClassReplacements.cpp
  test/clang-rename/ClassSimpleRenaming.cpp
  test/clang-rename/ClassTestMulti.cpp
  test/clang-rename/ClassTestMultiByName.cpp
  test/clang-rename/ClassTestMultiByNameYAML.cpp
  test/clang-rename/ComplexFunctionOverride.cpp
  test/clang-rename/ComplicatedClassType.cpp
  test/clang-rename/Ctor.cpp
  test/clang-rename/CtorInitializer.cpp
  test/clang-rename/DeclRefExpr.cpp
  test/clang-rename/Field.cpp
  test/clang-rename/FunctionMacro.cpp
  test/clang-rename/FunctionOverride.cpp
  test/clang-rename/FunctionWithClassFindByName.cpp
  test/clang-rename/Inputs/ClassTestMultiByNameYAMLRenameAll.yaml
  test/clang-rename/Inputs/ClassTestMultiByNameYAMLRenameAt.yaml
  test/clang-rename/InvalidNewName.cpp
  test/clang-rename/InvalidOldName.cpp
  test/clang-rename/MemberExprMacro.cpp
  test/clang-rename/Namespace.cpp
  test/clang-rename/NoNewName.cpp
  test/clang-rename/TemplateClassInstantiation.cpp
  test/clang-rename/TemplateTypename.cpp
  test/clang-rename/UserDefinedConversion.cpp
  test/clang-rename/Variable.cpp
  test/clang-rename/VariableMacro.cpp
  unittests/CMakeLists.txt
  unittests/clang-rename/CMakeLists.txt
  unittests/clang-rename/USRLocFindingTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24192.70163.patch
Type: text/x-patch
Size: 94101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160902/a0922922/attachment-0001.bin>


More information about the cfe-commits mailing list