diff --git a/unittests/ADT/OptionSetTest.cpp b/unittests/ADT/OptionSetTest.cpp index 8532c1d4e4ff..2f22db47d178 100644 --- a/unittests/ADT/OptionSetTest.cpp +++ b/unittests/ADT/OptionSetTest.cpp @@ -65,6 +65,8 @@ TEST(OptionSet, intptr_t) { EXPECT_EQ(static_cast(Small::A), static_cast(small)); +#ifndef _MSC_VER + // Fails to compile in MSVC. enum class UPtr : uintptr_t { A = std::numeric_limits::max() }; @@ -79,6 +81,7 @@ TEST(OptionSet, intptr_t) { OptionSet ptr = Ptr::A; EXPECT_EQ(static_cast(Ptr::A), static_cast(ptr)); +#endif } TEST(OptionSet, intptr_t_isConstructible) {