From 9e5283f27f753a226100a0878b3be5b44f603f19 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 12 Apr 2018 23:56:17 +0000 Subject: [PATCH] [libcxx] [test] Use TEST_COMPILER_C1XX. Also TEST_COMPILER_CLANG in one place. (More could be changed.) llvm-svn: 329977 --- .../alg.modifying.operations/alg.generate/generate_n.pass.cpp | 5 +++-- .../ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp | 6 ++++-- .../locale.num.get/facet.num.get.members/test_neg_one.pass.cpp | 3 ++- .../std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp | 8 ++++---- 4 files changed, 13 insertions(+), 9 deletions(-) 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 index 3613244..7e81610 100644 --- 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 @@ -15,14 +15,15 @@ // constexpr void // constexpr after c++17 // generate_n(Iter first, Size n, Generator gen); -#ifdef _MSC_VER +#include "test_macros.h" + +#ifdef TEST_COMPILER_C1XX #pragma warning(disable: 4244) // conversion from 'const double' to 'int', possible loss of data #endif #include #include -#include "test_macros.h" #include "test_iterators.h" #include "user_defined_integral.hpp" 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 index 0baefb5..cc451c0 100644 --- 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 @@ -17,11 +17,13 @@ #include #include -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wliteral-conversion" #endif -#ifdef _MSC_VER +#ifdef TEST_COMPILER_C1XX #pragma warning(disable: 4244) // conversion from 'X' to 'Y', possible loss of data #endif 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 index 693d81a..bd9b3f0 100644 --- 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 @@ -21,8 +21,9 @@ #include #include #include "test_iterators.h" +#include "test_macros.h" -#ifdef _MSC_VER +#ifdef TEST_COMPILER_C1XX #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 index 72d5854..2c2abe6 100644 --- 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 @@ -45,10 +45,10 @@ test1() assert((LCE::min() == (c == 0u ? 1u: 0u))); #endif -#ifdef _MSC_VER +#ifdef TEST_COMPILER_C1XX #pragma warning(push) #pragma warning(disable: 4310) // cast truncates constant value -#endif // _MSC_VER +#endif // TEST_COMPILER_C1XX #if TEST_STD_VER >= 11 static_assert((LCE::max() == result_type(m - 1u)), ""); @@ -56,9 +56,9 @@ test1() assert((LCE::max() == result_type(m - 1u))); #endif -#ifdef _MSC_VER +#ifdef TEST_COMPILER_C1XX #pragma warning(pop) -#endif // _MSC_VER +#endif // TEST_COMPILER_C1XX static_assert((LCE::default_seed == 1), ""); where(LCE::multiplier); -- 2.7.4