[PATCH] D122698: [clangd] Add support to extract method for ExtractFunction Tweak

Fabio R. Sluzala via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 21:15:40 PDT 2022


FabioRS updated this revision to Diff 419616.
FabioRS marked 6 inline comments as done.
FabioRS set the repository for this revision to rG LLVM Github Monorepo.
FabioRS added a comment.

  namespace ns { int y = 1; void foo(); }
  void ns::foo() {[[int x; y++; ]]}



  namespace ns { int y = 1; void foo(); }
  void extracted() {
  int x; y++;
  }
  void ns::foo() {extracted(); }

This is not working, but I think it's not the scope of this review request, what do you think?

(See the tests line 478)

          class SomeClass {
            static ns::A::C::RType extracted();
  static C::RType f();
          };

This is valid code but the syntactic looks strange with all the namespaces/classes, I tested various contexts but was not fixed, do you have some ideia for me to do?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122698/new/

https://reviews.llvm.org/D122698

Files:
  clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
  clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122698.419616.patch
Type: text/x-patch
Size: 19786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220401/67a11513/attachment-0001.bin>


More information about the cfe-commits mailing list