[all-commits] [llvm/llvm-project] a0e4ba: [clangd] Add support to extract method for Extract...
Fabio R. Sluzala via All-commits
all-commits at lists.llvm.org
Tue Apr 5 10:49:51 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a0e4ba4b4607267d96c3ab8bc1c38f5a09830692
https://github.com/llvm/llvm-project/commit/a0e4ba4b4607267d96c3ab8bc1c38f5a09830692
Author: Fabio Rossini Sluzala <fabio3rs at gmail.com>
Date: 2022-04-05 (Tue, 05 Apr 2022)
Changed paths:
M clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
M clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp
Log Message:
-----------
[clangd] Add support to extract method for ExtractFunction Tweak
I miss more automatically refactoring functions when working with already running code, so I am making some small addition that I hope help more people.
This works by checking if the function is a method (CXXMethodDecl), then collecting information about the function that the code is being extracted, looking for the declaration if it is out-of-line, creating the declaration if it is necessary and putting the extracted function as a class-method.
This is my first code review request, sorry if I did something wrong.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D122698
More information about the All-commits
mailing list