[PATCH] D66637: [clangd] Support multifile edits as output of Tweaks

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 04:51:48 PDT 2019


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:414
+      if (llvm::Error Err = reformatEdit(E, Style)) {
+        llvm::handleAllErrors(std::move(Err), [&](llvm::ErrorInfoBase &EIB) {
+          elog("Failed to format {0}: {1}", It.first(), EIB.message());
----------------
sammccall wrote:
> kadircet wrote:
> > sammccall wrote:
> > > isn't this just
> > > `elog("Failed to format {0}: {1}", std::move(Err))`
> > IIUC, just printing the error doesn't actually mark it as checked, therefore causes an assertion failure (see `getPtr` vs `getPayload` in `llvm::Error`). And I couldn't see any special handling in `elog`, but not sure if `formatv object` has this.
> The special handling is on Logger.h:38. Do you see crashes?
ah OK, didn't notice the `fmt_consume` previously. no, I wasn't seeing any crashes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66637





More information about the cfe-commits mailing list