[PATCH] D33415: [clangd] Replaced WorkerRequest with std::function...

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 02:51:09 PDT 2017


krasimir added inline comments.


================
Comment at: clangd/ClangdUnitStore.h:56
+  template <class Func>
+  void runOnExistingUnit(PathRef File, Func Action) {
+    std::lock_guard<std::mutex> Lock(Mutex);
----------------
krasimir wrote:
> Maybe make it less generic and put the implementation in the source file? It uses std::function anyways.
Sorry, I didn't see the surroundings. Disregard this comment.


================
Comment at: clangd/ClangdUnitStore.h:62
+
+    Action(It->second);
+  }
----------------
Why can't we use `runOnUnitImpl` here?


https://reviews.llvm.org/D33415





More information about the cfe-commits mailing list