diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-02-28 01:44:26 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-02-28 01:44:26 +0000 |
commit | 9b4886ee55c4d13cf0f663fe0ee5e0cfacb39667 (patch) | |
tree | 04c623c4b90a0f279e1cb5405c5b62f7bbb7baeb /unittests | |
parent | 2b9a946f981963c226eaafe1dd8fb8801b87d411 (diff) | |
download | external_llvm-9b4886ee55c4d13cf0f663fe0ee5e0cfacb39667.zip external_llvm-9b4886ee55c4d13cf0f663fe0ee5e0cfacb39667.tar.gz external_llvm-9b4886ee55c4d13cf0f663fe0ee5e0cfacb39667.tar.bz2 |
[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
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Support/ErrorOrTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<int> t1() {return 1;} -ErrorOr<int> t2() {return make_error_code(errc::invalid_argument);} +ErrorOr<int> t2() { return errc::invalid_argument; } TEST(ErrorOr, SimpleValue) { ErrorOr<int> a = t1(); @@ -45,8 +45,8 @@ TEST(ErrorOr, Types) { *a = 42; EXPECT_EQ(42, x); - EXPECT_FALSE(ErrorOr<void>(make_error_code(errc::broken_pipe))); - EXPECT_TRUE(ErrorOr<void>(make_error_code(errc::success))); + EXPECT_FALSE(ErrorOr<void>(errc::broken_pipe)); + EXPECT_TRUE(ErrorOr<void>(errc::success)); #if LLVM_HAS_CXX11_STDLIB // Move only types. |