[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Shaurya Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370249: [Clangd] Initial version of ExtractFunction (authored by SureYeaah, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:119 + case SelectionTree::Selection::Partial: +// Treat Partially selected VarDecl as completely selected since +// SelectionTree doesn't always select VarDecls corr

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 217701. SureYeaah marked 14 inline comments as done. SureYeaah added a comment. Addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65526/new/ https://reviews.llvm.org/D65526 Files: cla

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:165 +else + SR.setEnd(ChildFileRange->getEnd()); + } SureYeaah wrote: > kadircet wrote: > > I suppose thi

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. I think we should go ahead and land this. The only points that I'd really like to see fixed is `shared_ptr`, mostly because it's a strong signal there's something complicated going on an

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:165 +else + SR.setEnd(ChildFileRange->getEnd()); + } kadircet wrote: > I suppose this relies on the fact that "AST contains the nodes ordered by >

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 217620. SureYeaah added a comment. NFC: Whitespace formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65526/new/ https://reviews.llvm.org/D65526 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeL

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-28 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 217619. SureYeaah marked 45 inline comments as done. SureYeaah added a comment. Addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65526/new/ https://reviews.llvm.org/D65526 Files: cla

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:46 +//creating a NewFunction. +// Design Doc at +//===--===// please fix or remove c

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:29 +// - Always passed by l-value reference +// - No return +// - Cannot move declarations before extracting did you mean no return *type* ? =

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-26 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 217108. SureYeaah added a comment. Fixed typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65526/new/ https://reviews.llvm.org/D65526 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt clang

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-23 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 216831. SureYeaah marked 2 inline comments as done. SureYeaah edited the summary of this revision. SureYeaah added a comment. Removed extra code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65526/new/ https:

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-23 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah marked an inline comment as done. SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:360 + +CapturedSourceInfo::DeclInformation & +CapturedSourceInfo::getDeclInformationFor(const Decl *D) { SureYeaa

[PATCH] D65526: [Clangd] First version of ExtractFunction

2019-08-23 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:214 +bool IsConst; +Parameter(std::string Name, std::string Type, bool IsConst) +: Name(Name), Type(Type), IsConst(IsConst) {} sammccall wrot