[PATCH] D82642: [clangd] Run formatting operations asynchronously.

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 01:02:42 PDT 2020


kbobyrev accepted this revision.
kbobyrev added a comment.
This revision is now accepted and ready to land.

Looks nice just a couple of nits.



================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:900
+          llvm::Expected<tooling::Replacements> Result) mutable {
+        if (Result)
+          Reply(replacementsToEdits(Code, Result.get()));
----------------
`Reply(Result ? replacementsToEdits(...) : Result.takeError())` may be shorter, but up to you, maybe this looks more readable.


================
Comment at: clang-tools-extra/clangd/ClangdServer.h:326
 private:
-  /// FIXME: This stats several files to find a .clang-format file. I/O can be
-  /// slow. Think of a way to cache this.
----------------
Is this no longer true?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82642





More information about the cfe-commits mailing list