[PATCH] D51221: [clangd] Some nitpicking around the new split (preamble/main) dynamic index

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 28 23:57:34 PDT 2018


sammccall added inline comments.


================
Comment at: clangd/TUScheduler.cpp:632
                          bool StorePreamblesInMemory,
-                         ParsingCallbacks &Callbacks,
+                         std::unique_ptr<ParsingCallbacks> Callbacks,
                          std::chrono::steady_clock::duration UpdateDebounce,
----------------
ilya-biryukov wrote:
> Why not `ParsingCallbacks*` or `ParsingCallbacks&`? This restricts the lifetime of the passed values.
> Our particular use-case LG this way, but it seems there is no reason why `TUScheduler` should own the callbacks.
As noted above, this is just like std::function.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51221





More information about the cfe-commits mailing list