From 9b4886ee55c4d13cf0f663fe0ee5e0cfacb39667 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Thu, 28 Feb 2013 01:44:26 +0000 Subject: [Support][ErrorOr] Add support for implicit conversion from error code/condition enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176228 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Support/ErrorOrTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'unittests') diff --git a/unittests/Support/ErrorOrTest.cpp b/unittests/Support/ErrorOrTest.cpp index aa0ddd5..4853426 100644 --- a/unittests/Support/ErrorOrTest.cpp +++ b/unittests/Support/ErrorOrTest.cpp @@ -18,7 +18,7 @@ using namespace llvm; namespace { ErrorOr t1() {return 1;} -ErrorOr t2() {return make_error_code(errc::invalid_argument);} +ErrorOr t2() { return errc::invalid_argument; } TEST(ErrorOr, SimpleValue) { ErrorOr a = t1(); @@ -45,8 +45,8 @@ TEST(ErrorOr, Types) { *a = 42; EXPECT_EQ(42, x); - EXPECT_FALSE(ErrorOr(make_error_code(errc::broken_pipe))); - EXPECT_TRUE(ErrorOr(make_error_code(errc::success))); + EXPECT_FALSE(ErrorOr(errc::broken_pipe)); + EXPECT_TRUE(ErrorOr(errc::success)); #if LLVM_HAS_CXX11_STDLIB // Move only types. -- cgit v1.1