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 ExpectedHolder TakeExpected(const Expected &Exp) { - return TakeExpected(const_cast &>(Exp)); +template ExpectedHolder TakeExpected(Expected &&Exp) { + return TakeExpected(Exp); } } // namespace detail