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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits