summaryrefslogtreecommitdiff
path: root/unittests/Support/ErrorOrTest.cpp
Commit message (Collapse)AuthorAge
* Use LLVM_EXPLICIT instead of a function pointer as bool.Rafael Espindola2014-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199437 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a unit test for the copy constructor.Rafael Espindola2014-01-09
| | | | | | | | I would not normally add tests like these, but the copy constructor is not used at all in our codebase with c++11, so having this tests might prevent breaking the c++03 build again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198886 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getError and remove the error_code operator.Rafael Espindola2014-01-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198799 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-07
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198685 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify ErrorOr.Rafael Espindola2013-11-05
| | | | | | | | | | | | | | | | ErrorOr had quiet a bit of complexity and indirection to be able to hold a user type with the error. That feature is not used anymore. This patch removes it, it will live in svn history if we ever need it again. If we do need it again, IMHO there is one thing that should be done differently: Holding extra info in the error is not a property a function also returning a value or not. The ability to hold extra info should be in the error type and ErrorOr templated over it so that we don't need the funny looking ErrorOr<void>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194030 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for implicit conversion from error ↵Michael J. Spencer2013-02-28
| | | | | | code/condition enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176228 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for convertable types.Michael J. Spencer2013-02-06
| | | | | | Thanks to Andrew, David, and Aaron for helping fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174552 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Support][ErrorOr] Add support for convertable types."Andrew Trick2013-02-05
| | | | | | | | | This reverts commit a33e1fafac7fedb1b080ef07ddf9ad6ddff3a830. This unit test crashes on Darwon. It needs to be temporarily reverted to unblock the test infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174458 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add support for convertable types.Michael J. Spencer2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174357 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support][ErrorOr] Add optimized specialization of ErrorOr<void>.Michael J. Spencer2013-01-23
| | | | | | | | ErrorOr<void> represents an operation that returns nothing, but can still fail. It should be used in cases where you need the aditional user data that ErrorOr provides over error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173209 91177308-0d34-0410-b5e6-96231b3b80d8
* ErrorOrTest.cpp: Check existence of EXPECT_DEBUG_DEATH. It is not always ↵NAKAMURA Takumi2013-01-22
| | | | | | available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173123 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Make test C++03.Michael J. Spencer2013-01-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173004 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable test that fails due to lack of std::true_type in C++03.Benjamin Kramer2013-01-20
| | | | | | Michael, can this test be ported to C++03? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172996 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Port ErrorOr<T> from lld to C++03.Michael J. Spencer2013-01-20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172991 91177308-0d34-0410-b5e6-96231b3b80d8