[libcxx] r329977 - [libcxx] [test] Use TEST_COMPILER_C1XX.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 12 16:56:17 PDT 2018


Author: stl_msft
Date: Thu Apr 12 16:56:17 2018
New Revision: 329977

URL: http://llvm.org/viewvc/llvm-project?rev=329977&view=rev
Log:
[libcxx] [test] Use TEST_COMPILER_C1XX.

Also TEST_COMPILER_CLANG in one place. (More could be changed.)

Modified:
    libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
    libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp
    libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp

Modified: libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp Thu Apr 12 16:56:17 2018
@@ -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 <algorithm>
 #include <cassert>
 
-#include "test_macros.h"
 #include "test_iterators.h"
 #include "user_defined_integral.hpp"
 

Modified: libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==============================================================================
--- libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp Thu Apr 12 16:56:17 2018
@@ -17,11 +17,13 @@
 #include <sstream>
 #include <cassert>
 
-#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
 

Modified: libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp Thu Apr 12 16:56:17 2018
@@ -21,8 +21,9 @@
 #include <sstream>
 #include <iostream>
 #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
 

Modified: libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp Thu Apr 12 16:56:17 2018
@@ -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);




More information about the cfe-commits mailing list