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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to