[PATCH] D34405: [Testing/Support] Remove the const_cast in TakeExpected
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 06:12:43 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL306001: [Testing/Support] Remove the const_cast in TakeExpected (authored by labath).
Changed prior to commit:
https://reviews.llvm.org/D34405?vs=103212&id=103563#toc
Repository:
rL LLVM
https://reviews.llvm.org/D34405
Files:
llvm/trunk/include/llvm/Testing/Support/Error.h
Index: llvm/trunk/include/llvm/Testing/Support/Error.h
===================================================================
--- llvm/trunk/include/llvm/Testing/Support/Error.h
+++ llvm/trunk/include/llvm/Testing/Support/Error.h
@@ -30,8 +30,8 @@
return Result;
}
-template <typename T> ExpectedHolder<T> TakeExpected(const Expected<T> &Exp) {
- return TakeExpected(const_cast<Expected<T> &>(Exp));
+template <typename T> ExpectedHolder<T> TakeExpected(Expected<T> &&Exp) {
+ return TakeExpected(Exp);
}
} // namespace detail
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34405.103563.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170622/6be2e142/attachment.bin>
More information about the llvm-commits
mailing list