diff --git a/llvm/unittests/Support/FormatVariadicTest.cpp b/llvm/unittests/Support/FormatVariadicTest.cpp index 44e4477eb0b08..58c89aad7a85b 100644 --- a/llvm/unittests/Support/FormatVariadicTest.cpp +++ b/llvm/unittests/Support/FormatVariadicTest.cpp @@ -706,20 +706,21 @@ TEST(FormatVariadicTest, FormatFilterRange) { namespace { +enum class Base { First }; + class IntegerValuesRange final - : public indexed_accessor_range { + : public indexed_accessor_range { public: - using indexed_accessor_range::indexed_accessor_range; - static int dereference(const NoneType &, ptrdiff_t Index) { + static int dereference(const Base &, ptrdiff_t Index) { return static_cast(Index); } }; TEST(FormatVariadicTest, FormatRangeNonRef) { - IntegerValuesRange Range(None, 0, 3); + IntegerValuesRange Range(Base(), 0, 3); EXPECT_EQ("0, 1, 2", formatv("{0}", make_range(Range.begin(), Range.end())).str()); }