[PATCH] D50502: [clangd] Initial cancellation mechanism for LSP requests.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 17 08:59:47 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/ClangdLSPServer.cpp:80
+ if (NormalizedID.front() == '"')
+ NormalizedID = NormalizedID.substr(1, NormalizedID.size() - 2);
+ return NormalizedID;
----------------
This still misses string escaping issues. E.g. `"` will get quoted as `\"`, etc.
I suggest we actually switch on this json value kind.
Better yet, reuse the part of `fromJSON(CancelParams)` that does the request-id parsing.
================
Comment at: clangd/ClangdServer.cpp:166
+ if (isCancelled())
+ return CB(llvm::make_error<CancelledError>());
----------------
NIT: check for it even before looking at the preamble?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50502
More information about the cfe-commits
mailing list