diff options
Diffstat (limited to 'llvm/unittests/ADT')
| -rw-r--r-- | llvm/unittests/ADT/APIntTest.cpp | 8 | ||||
| -rw-r--r-- | llvm/unittests/ADT/IteratorTest.cpp | 4 | ||||
| -rw-r--r-- | llvm/unittests/ADT/OptionalTest.cpp | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp index 3dba0fa..c5a9859 100644 --- a/llvm/unittests/ADT/APIntTest.cpp +++ b/llvm/unittests/ADT/APIntTest.cpp @@ -2932,10 +2932,10 @@ TEST(APIntTest, MultiplicativeInverseExaustive) { TEST(APIntTest, GetMostSignificantDifferentBit) { EXPECT_EQ(APIntOps::GetMostSignificantDifferentBit(APInt(8, 0), APInt(8, 0)), - llvm::None); + std::nullopt); EXPECT_EQ( APIntOps::GetMostSignificantDifferentBit(APInt(8, 42), APInt(8, 42)), - llvm::None); + std::nullopt); EXPECT_EQ(*APIntOps::GetMostSignificantDifferentBit(APInt(8, 0), APInt(8, 1)), 0u); EXPECT_EQ(*APIntOps::GetMostSignificantDifferentBit(APInt(8, 0), APInt(8, 2)), @@ -2945,7 +2945,7 @@ TEST(APIntTest, GetMostSignificantDifferentBit) { EXPECT_EQ(*APIntOps::GetMostSignificantDifferentBit(APInt(8, 1), APInt(8, 0)), 0u); EXPECT_EQ(APIntOps::GetMostSignificantDifferentBit(APInt(8, 1), APInt(8, 1)), - llvm::None); + std::nullopt); EXPECT_EQ(*APIntOps::GetMostSignificantDifferentBit(APInt(8, 1), APInt(8, 2)), 1u); EXPECT_EQ(*APIntOps::GetMostSignificantDifferentBit(APInt(8, 1), APInt(8, 3)), @@ -2960,7 +2960,7 @@ TEST(APIntTest, GetMostSignificantDifferentBitExaustive) { [](const APInt &V0, const APInt &V1) -> llvm::Optional<unsigned> { assert(V0.getBitWidth() == V1.getBitWidth() && "Must have same bitwidth"); if (V0 == V1) - return llvm::None; // Bitwise identical. + return std::nullopt; // Bitwise identical. // There is a mismatch. Let's find the most significant different bit. for (int Bit = V0.getBitWidth() - 1; Bit >= 0; --Bit) { if (V0[Bit] == V1[Bit]) diff --git a/llvm/unittests/ADT/IteratorTest.cpp b/llvm/unittests/ADT/IteratorTest.cpp index 14fbcd5..69cfadb 100644 --- a/llvm/unittests/ADT/IteratorTest.cpp +++ b/llvm/unittests/ADT/IteratorTest.cpp @@ -481,7 +481,7 @@ TEST(ZipIteratorTest, ZipLongestBasic) { const vector<tuple<Optional<unsigned>, Optional<StringRef>>> expected{ make_tuple(3, StringRef("2")), make_tuple(1, StringRef("7")), make_tuple(4, StringRef("1")), make_tuple(1, StringRef("8")), - make_tuple(5, None), make_tuple(9, None)}; + make_tuple(5, std::nullopt), make_tuple(9, std::nullopt)}; size_t iters = 0; for (auto tup : zip_longest(pi, e)) { EXPECT_EQ(tup, expected[iters]); @@ -495,7 +495,7 @@ TEST(ZipIteratorTest, ZipLongestBasic) { const vector<tuple<Optional<StringRef>, Optional<unsigned>>> expected{ make_tuple(StringRef("2"), 3), make_tuple(StringRef("7"), 1), make_tuple(StringRef("1"), 4), make_tuple(StringRef("8"), 1), - make_tuple(None, 5), make_tuple(None, 9)}; + make_tuple(std::nullopt, 5), make_tuple(std::nullopt, 9)}; size_t iters = 0; for (auto tup : zip_longest(e, pi)) { EXPECT_EQ(tup, expected[iters]); diff --git a/llvm/unittests/ADT/OptionalTest.cpp b/llvm/unittests/ADT/OptionalTest.cpp index 5f1f88d..76e99bb 100644 --- a/llvm/unittests/ADT/OptionalTest.cpp +++ b/llvm/unittests/ADT/OptionalTest.cpp @@ -680,12 +680,12 @@ void CheckRelation(const Optional<T> &Lhs, const Optional<T> &Rhs, if (Lhs) EXPECT_EQ(Expected, OperatorT::apply(*Lhs, Rhs)); else - EXPECT_EQ(Expected, OperatorT::apply(None, Rhs)); + EXPECT_EQ(Expected, OperatorT::apply(std::nullopt, Rhs)); if (Rhs) EXPECT_EQ(Expected, OperatorT::apply(Lhs, *Rhs)); else - EXPECT_EQ(Expected, OperatorT::apply(Lhs, None)); + EXPECT_EQ(Expected, OperatorT::apply(Lhs, std::nullopt)); } struct EqualityMock {}; @@ -800,7 +800,7 @@ TEST(OptionalTest, StreamOperator) { }; EXPECT_EQ("ComparableAndStreamable", to_string(ComparableAndStreamable::get())); - EXPECT_EQ("None", to_string(None)); + EXPECT_EQ("None", to_string(std::nullopt)); } struct Comparable { |
