[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs
Shaurya Gupta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 18 06:27:32 PDT 2019
SureYeaah marked 5 inline comments as done.
SureYeaah added inline comments.
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:208
const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor();
- if (!N)
- return false;
- Target = llvm::make_unique<ExtractionContext>(N, SM, Ctx);
- return Target->isExtractable();
+ computeExtractionContext(N, SM, Ctx);
+ return Target && Target->InsertionPoint;
> maybe instead of checking internals like `Target` just make `computeExtractionContext` return an `llvm::Error` and check for success?
Should it instead return a bool since there's actually no error?
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits