[ADT] Teach PointerUnion to support assignment directly from nullptr to

clear it out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth
2014-04-29 00:14:27 +00:00
parent b86c32fe38
commit 4ef6c0908b
2 changed files with 24 additions and 0 deletions

View File

@@ -46,6 +46,12 @@ TEST_F(PointerUnionTest, Null) {
EXPECT_TRUE((bool)a);
EXPECT_TRUE((bool)b);
EXPECT_FALSE(n);
EXPECT_NE(n, b);
EXPECT_EQ(b, c);
b = nullptr;
EXPECT_EQ(n, b);
EXPECT_NE(b, c);
}
TEST_F(PointerUnionTest, Is) {