[PATCH] D34405: [Testing/Support] Remove the const_cast in TakeExpected
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 10:02:28 PDT 2017
labath added a comment.
In https://reviews.llvm.org/D34405#785558, @zturner wrote:
> Right, but we have the `ASSERT_THAT_EXPECTED` macro, which can be re-written as `ASSERT_THAT(llvm::detail::Expected(std::move(Err), Matcher))`
Ah, that would work, I haven't thought of that.
I am not entirely thrilled by that, as that adds more bloat to the error message ("llvm::detail::TakeExpected(std::move(original_assert_expression)) failed"), but I could go with that.
https://reviews.llvm.org/D34405
More information about the llvm-commits
mailing list