[PATCH] D64565: [clangd] Don't run the prepare for tweaks that are disabled.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 07:53:45 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdServer.h:136
 
-    /// Returns true if the StringRef is a tweak that should be enabled
-    std::function<bool(llvm::StringRef)> TweakFilter = [](llvm::StringRef TweakToSearch) {return true;};
+    /// Returns true if the StringRef is a tweak ID that should be enabled.
+    std::function<bool(const Tweak &)> TweakFilter = [](const Tweak &T) {
----------------
NIT: the comment mentions `StringRef`, but function accepts a `Tweak` now.
Maybe update the comment?


================
Comment at: clang-tools-extra/clangd/refactor/Tweak.h:117
+prepareTweaks(const Tweak::Selection &S,
+              std::function<bool(const Tweak &)> Filter);
 
----------------
NIT: maybe use `function_ref` here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64565





More information about the cfe-commits mailing list