[PATCH] D63773: [clangd] dummy variable extraction on a function scope

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 1 05:26:20 PDT 2019


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:71
+}
+std::vector<clang::Decl *> Extract::getReferencedDecls() {
+  // RAV subclass to find all DeclRefs in a given Stmt
----------------
SureYeaah wrote:
> kadircet wrote:
> > this method doesn't use class state, maybe move it out-of-class to a function?
> It uses the expr
Nevertheless, as it just uses one param, has an obvious standalone meaning, and is called from the constructor, it does seem clearer to me as a helper outside the class.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63773





More information about the cfe-commits mailing list