[PATCH] D74834: [clangd] Expose the rename LimitFiles option to the C++ API, NFC.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 06:59:14 PST 2020


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdServer.h:145
 
-    /// Enable cross-file rename feature.
-    bool CrossFileRename = false;
+    /// Options for rename.
+    RenameOptions RenameOpts;
----------------
rename is just a normal API call, why is this a server option rather than a parameter to rename()?
It probably needs to be a member in ClangdLSPServer though, like CodeCompleteOptions.

(WantFormat belongs in this struct, I think)


================
Comment at: clang-tools-extra/clangd/refactor/Rename.h:30
+struct RenameOptions {
+  bool AllowCrossFile = false;
+  /// The mamimum number of affected files (0 means no limit), only meaningful
----------------
This needs a comment.

Or combine with LimitFiles, so that 0 means no cross-file rename.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74834





More information about the cfe-commits mailing list