[PATCH] D38583: [clangd] Added async API to run code completion.

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 06:32:42 PDT 2017


klimek added inline comments.


================
Comment at: clangd/ClangdServer.cpp:222
+
+  std::shared_ptr<PreambleData const> Preamble =
+      Resources->getPossiblyStalePreamble();
----------------
I think we use "const type" everywhere.


================
Comment at: clangd/ClangdServer.cpp:225
+  // A task that will be run asynchronously.
+  PackagedTask Task([=]() mutable { // 'mutable' to reassign Preamble variable.
+    if (!Preamble) {
----------------
It doesn't seem like we use Preamble anywhere else but in the lambda - so why not get it in the lambda?


https://reviews.llvm.org/D38583





More information about the cfe-commits mailing list