[PATCH] D39057: [clangd][WIP] Integrate the refactoring actions into clangd

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 18 07:15:20 PDT 2017


arphaman created this revision.
arphaman added a project: clang-tools-extra.
Herald added a subscriber: mgorny.

This WIP patch provides a sample implementation of an integration of Clang's refactoring actions from libToolingRefactor into clangd.

In terms of protocol support, the patch adds:

- Support for the `Command` & `CommandArgument` structures.
- Support for the `workspace/executeCommand` command.

Note that the rename is not supported as an editor command since LSP has another entry in the protocol for it.

The integration with the refactoring library is done through the `RefactoringEditorClient` class that's implemented in a parent revision. Right now the test checks that the initial version of the "extract function" refactoring can be performed.


Repository:
  rL LLVM

https://reviews.llvm.org/D39057

Files:
  clangd/CMakeLists.txt
  clangd/ClangdLSPServer.cpp
  clangd/ClangdLSPServer.h
  clangd/ClangdServer.cpp
  clangd/ClangdServer.h
  clangd/ClangdUnit.cpp
  clangd/ClangdUnit.h
  clangd/Protocol.cpp
  clangd/Protocol.h
  clangd/ProtocolHandlers.cpp
  clangd/ProtocolHandlers.h
  test/clangd/refactoring.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39057.119481.patch
Type: text/x-patch
Size: 19818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171018/37d68793/attachment-0001.bin>


More information about the cfe-commits mailing list