Allow Optionals to be compared to None
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Aug 2015 23:07:27 +0000 (23:07 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Aug 2015 23:07:27 +0000 (23:07 +0000)
commit116832190dc04f511dacff847742733cc957d46a
treee6033ab2e5d84ee40af1af861d09b3f56fbccda3
parent3c8ad803340edbbcf39cc4a40e5163ad0b71cb25
Allow Optionals to be compared to None

This is something like nullopt in std::experimental::optional. Optional
could already be constructed from None, so this seems like an obvious
extension from there.

I have a use in a future patch for Clang, though it may not go that
way/end up used - so this seemed worth committing now regardless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245518 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Optional.h
unittests/ADT/OptionalTest.cpp