ilya-biryukov added inline comments.

================
Comment at: clangd/ClangdLSPServer.cpp:153
+  if (ReplacementsOrError) {
+    C.reply(json::ary{replacementsToEdits(Code, ReplacementsOrError.get())});
+  } else {
----------------
NIT: remove braces from single-statement branches


================
Comment at: clangd/ClangdLSPServer.cpp:165
+  if (ReplacementsOrError) {
+    C.reply(json::ary{replacementsToEdits(Code, ReplacementsOrError.get())});
+  } else {
----------------
NIT: remove braces from single-statement branches


================
Comment at: clangd/ClangdServer.h:289
+  llvm::Expected<std::vector<tooling::Replacement>>
+  formatRange(llvm::StringRef Code, PathRef File, Range Rng);
+
----------------
Why do we accept `Code` as a parameter here instead of getting it internally?

Maybe we should consider moving this method out of `ClangdServer`? Its 
signature looks pretty self-contained now.


https://reviews.llvm.org/D39430



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

Reply via email to