ilya-biryukov added inline comments.

================
Comment at: clangd/ClangdServer.cpp:366
+  auto Style = getFormatStyle(Code, File);
+  if (!Style)
+    return;
----------------
ioeric wrote:
> hokein wrote:
> > not sure the err-handling strategy here -- maybe if this is failed, we 
> > still apply replacements (without formatting), rather than stopping.
> You should use `getFormatStyleForFile` from SourceCode.h
> not sure the err-handling strategy here -- maybe if this is failed, we still 
> apply replacements (without formatting), rather than stopping.
Returning an error seems fine, this probably shouldn't happen under normal 
conditions and failing early means we're more likely to find the root-cause of 
the problem.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D57739



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

Reply via email to