[PATCH] D27440: clang-format-vsix: fail when clang-format outputs to stderr

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 07:25:54 PST 2016


klimek added a comment.

In https://reviews.llvm.org/D27440#626477, @amaiorano wrote:

> In https://reviews.llvm.org/D27440#626415, @ioeric wrote:
>
> > `llvm::ErrorOr` carries `std::error_code`. If you want richer information (e.g. error_code + error message), `llvm::Expcted<T>` and `llvm::Error` are your friends.
> >
> > FYI, if you only need error_code + error_message in the returned error, there is also `llvm::StringError`. And if you want to carry even more information in the errors, you can implement `llvm::ErrorInfo`, which is what we are doing in libTooling replacements library: https://github.com/llvm-mirror/clang/blob/master/include/clang/Tooling/Core/Replacement.h#L150
>
>
> Thanks, I'll check these out! Btw, I noticed that the clang-format tests are non-Windows due to path assumptions. Is this a lost cause, or just something no one's bothered to look into yet?


No one's bothered looking into it yet.


https://reviews.llvm.org/D27440





More information about the cfe-commits mailing list