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

2022-04-05 Thread Fabio Rossini Sluzala via Phabricator via cfe-commits
FabioRS added a comment. In D122698#3430211 , @sammccall wrote: > You're right about the out-of-line function case. Current version looks great! > I had to rework the logic around merging the edits a little, it wasn't quite > correct and was hitting asse

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

2022-04-04 Thread Fabio Rossini Sluzala via Phabricator via cfe-commits
FabioRS updated this revision to Diff 420336. FabioRS added a comment. Thanks! I removed the excess setting/resseting of the SyntacticDC and SemanticDC ExtractedFunc.SyntacticDC = ExtZone.EnclosingFunction->getLexicalDeclContext(); ExtractedFunc.SemanticDC = ExtZone.EnclosingFunction->

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

2022-04-04 Thread Fabio Rossini Sluzala via Phabricator via cfe-commits
FabioRS added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:765 + + ExtractedFunc.ForwardDeclarationSyntacticDC = ExtractedFunc.SemanticDC = + ExtractedFunc.SyntacticDC = ExtZone.EnclosingFunction->getDeclContext(); --

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

2022-04-04 Thread Fabio Rossini Sluzala via Phabricator via cfe-commits
FabioRS marked 2 inline comments as done. FabioRS added a comment. In D122698#3426237 , @sammccall wrote: > Thanks, this looks great! Just a couple of nits left. > Appreciate you fixing the out-of-line `ns::f()` case too. It's easier to > understand the