summaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-05 23:41:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-05 23:41:57 +0000
commitc86cf046501035b9b931bb2a86ed7b81b8fa9847 (patch)
tree47e4813bc586cc04687041729e92f4a3bfd8eff6 /test/Analysis
parentc9080b7bc9fa7acb8cfe65e22b40697ef8286c27 (diff)
downloadllvm-c86cf046501035b9b931bb2a86ed7b81b8fa9847.tar.gz
llvm-c86cf046501035b9b931bb2a86ed7b81b8fa9847.tar.bz2
llvm-c86cf046501035b9b931bb2a86ed7b81b8fa9847.tar.xz
Remove another unused, and IMHO, not very desirable feature of ErrorOr.
One of the uses of the IsValid flag is to support default constructing a ErrorOr that is not a Error or a Value. There is not much value in doing that IMHO. If ErrorOr was to have a default constructor, it should be implemented by default constructing the value, but even that looks unnecessary. The other use is to avoid calling destructors on moved objects. This looks wrong. If the data being moved has non trivial treatment of moves (an std::vector for example), it is its destructor that should handle it, not ~ErrorOr. With this change ErrorOr becomes a fairly simple wrapper and should always be better than using an error_code + value in an API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
0 files changed, 0 insertions, 0 deletions