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

Antonio Maiorano via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 05:50:11 PST 2016


amaiorano added a comment.

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?


https://reviews.llvm.org/D27440





More information about the cfe-commits mailing list