diff --git a/libcxx/include/__support/win32/limits_msvc_win32.h b/libcxx/include/__support/win32/limits_msvc_win32.h --- a/libcxx/include/__support/win32/limits_msvc_win32.h +++ b/libcxx/include/__support/win32/limits_msvc_win32.h @@ -14,7 +14,7 @@ #error "This header complements the Microsoft C Runtime library, and should not be included otherwise." #endif #if defined(__clang__) -#error "This header should only be included when using Microsofts C1XX frontend" +#error "This header should only be included when using Microsoft's C1XX frontend" #endif #include // limit constants diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp @@ -16,7 +16,7 @@ #include "test_macros.h" -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(disable: 4244) // conversion from 'const double' to 'int', possible loss of data #endif diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp @@ -165,14 +165,14 @@ // Make sure initialization is performed with each element value, not with // a memory blob. float array[3] = {0.0f, 1.0f, 2.0f}; -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(push) #pragma warning(disable: 4244) // conversion from 'float' to 'int', possible loss of data -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC std::vector v(array, array + 3); -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(pop) -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC assert(v[0] == 0); assert(v[1] == 1); assert(v[2] == 2); diff --git a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp --- a/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp +++ b/libcxx/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp @@ -22,7 +22,7 @@ #pragma clang diagnostic ignored "-Wliteral-conversion" #endif -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(disable: 4244) // conversion from 'X' to 'Y', possible loss of data #endif diff --git a/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp b/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp --- a/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp +++ b/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp @@ -7,19 +7,24 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-no-concepts -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare // constexpr auto synth-three-way = ...; // via std::tuple(t) <=> std::tuple(u), which exposes its behavior most directly +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) || defined(TEST_COMPILER_GCC) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(TEST_COMPILER_MSVC) +#pragma warning(disable: 4242 4244) // Various truncation warnings +#endif + #include #include #include // quiet_NaN #include #include // declval -#include "test_macros.h" - template concept can_synth_three_way = requires(T t, U u) { std::tuple(t) <=> std::tuple(u); }; diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp @@ -22,7 +22,7 @@ #include "test_iterators.h" #include "test_macros.h" -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned #endif diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp @@ -44,10 +44,10 @@ assert((LCE::min() == (c == 0u ? 1u: 0u))); #endif -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(push) #pragma warning(disable: 4310) // cast truncates constant value -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC #if TEST_STD_VER >= 11 static_assert((LCE::max() == result_type(m - 1u)), ""); @@ -55,9 +55,9 @@ assert((LCE::max() == result_type(m - 1u))); #endif -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(pop) -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC static_assert((LCE::default_seed == 1), ""); where(LCE::multiplier); diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp @@ -10,14 +10,19 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: libcpp-has-no-incomplete-ranges -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) || defined(TEST_COMPILER_GCC) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(TEST_COMPILER_MSVC) +#pragma warning(disable: 4018 4389) // various "signed/unsigned mismatch" +#endif // constexpr iota_view(type_identity_t value, type_identity_t bound); #include #include -#include "test_macros.h" #include "types.h" constexpr bool test() { @@ -57,4 +62,3 @@ return 0; } - diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp @@ -10,7 +10,13 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: libcpp-has-no-incomplete-ranges -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) || defined(TEST_COMPILER_GCC) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(TEST_COMPILER_MSVC) +#pragma warning(disable: 4018 4389) // various "signed/unsigned mismatch" +#endif // constexpr auto end() const; // constexpr iterator end() const requires same_as; @@ -18,7 +24,6 @@ #include #include -#include "test_macros.h" #include "types.h" template diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp @@ -10,14 +10,19 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: libcpp-has-no-incomplete-ranges -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare - // constexpr W operator*() const noexcept(is_nothrow_copy_constructible_v); +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) || defined(TEST_COMPILER_GCC) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(TEST_COMPILER_MSVC) +#pragma warning(disable: 4018) // various "signed/unsigned mismatch" +#endif + #include #include -#include "test_macros.h" #include "../types.h" struct NotNoexceptCopy { diff --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp --- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -245,7 +245,7 @@ ThrowsOnCopy() = default; bool operator()() const { assert(false); -#if defined(TEST_COMPILER_C1XX) +#ifdef TEST_COMPILER_MSVC __assume(0); #else __builtin_unreachable(); diff --git a/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.pass.cpp b/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.pass.cpp --- a/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.pass.cpp @@ -34,10 +34,10 @@ int main(int, char**) { #ifdef __cpp_lib_is_constant_evaluated -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(push) #pragma warning(disable: 5063) // 'std::is_constant_evaluated' always evaluates to true in manifestly constant-evaluated expressions -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC // Test the signature { ASSERT_SAME_TYPE(decltype(std::is_constant_evaluated()), bool); @@ -55,9 +55,9 @@ static int local_static = std::is_constant_evaluated() ? 42 : -1; assert(local_static == 42); } -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(pop) -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC #endif // __cpp_lib_is_constant_evaluated return 0; } diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -#if defined(TEST_COMPILER_C1XX) +#ifdef TEST_COMPILER_MSVC #pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp @@ -15,7 +15,7 @@ #include "test_macros.h" -#if defined(TEST_COMPILER_C1XX) +#ifdef TEST_COMPILER_MSVC #pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp --- a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp @@ -16,7 +16,7 @@ #include "../bitset_test_cases.h" #include "test_macros.h" -#if defined(TEST_COMPILER_C1XX) +#ifdef TEST_COMPILER_MSVC #pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp @@ -15,7 +15,14 @@ // operator<=>(const tuple& t, const tuple& u); // UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-no-concepts -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare + +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) || defined(TEST_COMPILER_GCC) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(TEST_COMPILER_MSVC) +#pragma warning(disable: 4242 4244) // Various truncation warnings +#endif #include #include @@ -23,8 +30,6 @@ #include #include // std::is_constant_evaluated -#include "test_macros.h" - // A custom three-way result type struct CustomEquality { friend constexpr bool operator==(const CustomEquality&, int) noexcept { return true; } diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp @@ -239,15 +239,15 @@ // Make sure we properly propagate triviality, which implies constexpr-ness (see P0602R4). #if TEST_STD_VER > 17 using V = std::variant; -#ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE +#ifdef TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE static_assert(std::is_trivially_destructible::value, ""); static_assert(std::is_trivially_copy_constructible::value, ""); static_assert(std::is_trivially_move_constructible::value, ""); static_assert(!std::is_copy_assignable::value, ""); static_assert(!std::is_move_assignable::value, ""); -#else // TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE +#else // TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE static_assert(std::is_trivially_copyable::value, ""); -#endif // TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE +#endif // TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE static_assert(test_constexpr_copy_ctor_imp<0>(V(42l)), ""); static_assert(test_constexpr_copy_ctor_imp<1>(V(nullptr)), ""); static_assert(test_constexpr_copy_ctor_imp<2>(V(101)), ""); diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp --- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp @@ -309,15 +309,15 @@ // Make sure we properly propagate triviality, which implies constexpr-ness (see P0602R4). #if TEST_STD_VER > 17 using V = std::variant; -#ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE +#ifdef TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE static_assert(std::is_trivially_destructible::value, ""); static_assert(std::is_trivially_copy_constructible::value, ""); static_assert(std::is_trivially_move_constructible::value, ""); static_assert(!std::is_copy_assignable::value, ""); static_assert(!std::is_move_assignable::value, ""); -#else // TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE +#else // TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE static_assert(std::is_trivially_copyable::value, ""); -#endif // TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE +#endif // TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE static_assert(std::is_trivially_move_constructible::value, ""); static_assert(test_constexpr_ctor_imp<0>(V(42l)), ""); static_assert(test_constexpr_ctor_imp<1>(V(nullptr)), ""); diff --git a/libcxx/test/support/archetypes.h b/libcxx/test/support/archetypes.h --- a/libcxx/test/support/archetypes.h +++ b/libcxx/test/support/archetypes.h @@ -23,9 +23,9 @@ struct DepType : T {}; struct NullBase { -#ifndef TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#ifndef TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK protected: -#endif // !TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#endif // !TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK NullBase() = default; NullBase(NullBase const&) = default; NullBase& operator=(NullBase const&) = default; @@ -92,9 +92,9 @@ ++assigned; ++value_assigned; return *this; } -#ifndef TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#ifndef TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK protected: -#endif // !TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#endif // !TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK ~TestBase() { assert(value != -999); assert(alive > 0); --alive; ++destroyed; value = -999; @@ -157,9 +157,9 @@ } //~ValueBase() { assert(value != -999); value = -999; } int value; -#ifndef TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#ifndef TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK protected: -#endif // !TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#endif // !TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK constexpr static int check_value(int const& val) { #if TEST_STD_VER < 14 return val == -1 || val == 999 ? (TEST_THROW(42), 0) : val; @@ -212,9 +212,9 @@ template ::type = true> constexpr TrivialValueBase(std::initializer_list& il, int = 0) : value(static_cast(il.size())) {} int value; -#ifndef TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#ifndef TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK protected: -#endif // !TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK +#endif // !TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK constexpr TrivialValueBase() noexcept : value(0) {} }; diff --git a/libcxx/test/support/charconv_test_helpers.h b/libcxx/test/support/charconv_test_helpers.h --- a/libcxx/test/support/charconv_test_helpers.h +++ b/libcxx/test/support/charconv_test_helpers.h @@ -180,10 +180,10 @@ r2 = from_chars(buf, r.ptr, x, args...); -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(push) #pragma warning(disable: 4127) // conditional expression is constant -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC if (std::is_signed::value && v < 0 && std::is_unsigned::value) { assert(x == 0xc); @@ -196,9 +196,9 @@ assert(r2.ptr == r.ptr); assert(r2.ec == std::errc::result_out_of_range); } -#ifdef TEST_COMPILER_C1XX +#ifdef TEST_COMPILER_MSVC #pragma warning(pop) -#endif // TEST_COMPILER_C1XX +#endif // TEST_COMPILER_MSVC } } diff --git a/libcxx/test/support/count_new.h b/libcxx/test/support/count_new.h --- a/libcxx/test/support/count_new.h +++ b/libcxx/test/support/count_new.h @@ -347,15 +347,15 @@ const bool MemCounter::disable_checking = false; #endif -#ifdef _MSC_VER +#ifdef TEST_COMPILER_MSVC #pragma warning(push) #pragma warning(disable: 4640) // '%s' construction of local static object is not thread safe (/Zc:threadSafeInit-) -#endif // _MSC_VER +#endif // TEST_COMPILER_MSVC inline MemCounter* getGlobalMemCounter() { static MemCounter counter((MemCounter::MemCounterCtorArg_())); return &counter; } -#ifdef _MSC_VER +#ifdef TEST_COMPILER_MSVC #pragma warning(pop) #endif diff --git a/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp b/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp --- a/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp +++ b/libcxx/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03 -// Verify TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE. +// Verify TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE. #include @@ -23,7 +23,7 @@ }; int main(int, char**) { -#if defined(TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE) +#ifdef TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE static_assert(!std::is_trivially_copyable::value, ""); #else static_assert(std::is_trivially_copyable::value, ""); diff --git a/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp b/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp --- a/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp +++ b/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03 -// Verify TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK. +// Verify TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK. #include @@ -33,7 +33,7 @@ auto test(long) -> std::false_type; int main(int, char**) { -#if defined(TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK) +#ifdef TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK static_assert(!decltype(test(0))::value, ""); #else static_assert(decltype(test(0))::value, ""); diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -77,7 +77,7 @@ # define TEST_COMPILER_APPLE_CLANG # endif #elif defined(_MSC_VER) -# define TEST_COMPILER_C1XX +# define TEST_COMPILER_MSVC #elif defined(__GNUC__) # define TEST_COMPILER_GCC #endif diff --git a/libcxx/test/support/test_workarounds.h b/libcxx/test/support/test_workarounds.h --- a/libcxx/test/support/test_workarounds.h +++ b/libcxx/test/support/test_workarounds.h @@ -16,12 +16,12 @@ # define TEST_WORKAROUND_EDG_EXPLICIT_CONSTEXPR // VSO-424280 #endif -#if defined(TEST_COMPILER_C1XX) +#ifdef TEST_COMPILER_MSVC # if _MSC_VER < 1927 -# define TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE // VSO-117743 +# define TEST_WORKAROUND_MSVC_BROKEN_IS_TRIVIALLY_COPYABLE // VSO-117743 # endif # ifndef _MSC_EXTENSIONS -# define TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK // VSO-119998 +# define TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK // VSO-119998 # endif #endif