ilya-biryukov added inline comments.

================
Comment at: clangd/ClangdLSPServer.cpp:153
+
+  auto Code = Server.getDocument(File);
+  if (!Code)
----------------
sammccall wrote:
> don't you want to do this before computing replacements?
Makes sense.


================
Comment at: clangd/ClangdLSPServer.cpp:155
+  if (!Code)
+    return replyError(C, ErrorCode::InternalError,
+                      "onRename called for non-added file");
----------------
sammccall wrote:
> invalidparams
I used `InternalError`, because `rename` should've returned an error for 
non-added file. If we do the check before calling `rename`, `InvalidParams` 
make more sense.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42164



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

Reply via email to