diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-05-05 23:51:39 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-05-05 23:51:39 +0000 |
commit | e803cc52bd035b322c2907e2dc2ddb2b49eea163 (patch) | |
tree | f9d3e927b8258a43b5bec0cc4162bbf0d92f20c0 /libcxx/test/std/utilities | |
parent | dccfdcb17bc199dad2443660eb80e7a5cdda8221 (diff) | |
download | bcm5719-llvm-e803cc52bd035b322c2907e2dc2ddb2b49eea163.tar.gz bcm5719-llvm-e803cc52bd035b322c2907e2dc2ddb2b49eea163.zip |
[libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more fine-grained manner.
Fixes D32926.
llvm-svn: 302325
Diffstat (limited to 'libcxx/test/std/utilities')
25 files changed, 119 insertions, 19 deletions
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 index ab623bb01f7..8830bf93292 100644 --- 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 @@ -19,6 +19,10 @@ #include "test_macros.h" +#if defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. +#endif + template <std::size_t N> void test_char_pointer_ctor() { diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp index f4f8d390de0..0ebf9b0b626 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp @@ -14,6 +14,10 @@ #include "test_macros.h" +#if defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. +#endif + template <std::size_t N> void test_default_ctor() { diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp index 0e4793027c9..91e9441fe3c 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp @@ -16,6 +16,10 @@ #include "test_macros.h" +#if defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. +#endif + template <std::size_t N> void test_string_ctor() { 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 index 3ba88ee2db5..be9d54716c5 100644 --- 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 @@ -16,6 +16,10 @@ #include "test_macros.h" +#if defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. +#endif + template <std::size_t N> void test_val_ctor() { diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp index c8a14c9b604..f6730a4fc44 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/count.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp index a25e5bd9da2..6d6bcd71162 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp index 18a64a214a4..9908811cf3d 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp @@ -15,6 +15,10 @@ #include "test_macros.h" +#if defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. +#endif + template <std::size_t N> std::bitset<N> make_bitset() diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp index f352475fc19..c29ba312af7 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/index.pass.cpp @@ -14,8 +14,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp index fbde54859f1..1ac0495da77 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp @@ -14,8 +14,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp index 57b77d2570d..9d630b9721a 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp index 3adab77b413..bbbddb9a228 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp index d9fbb3e11da..4f152e3f914 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp index 64ca15fda13..eaac1912422 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp index 5b7e10d677e..52157696e22 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp @@ -17,8 +17,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp index f2880f67ab6..98c7ce50917 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp index 420996759d0..a707a7f4d11 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp index eed25e27448..69de45e0396 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp @@ -12,8 +12,12 @@ #include <bitset> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp index 180fa84f448..554abde32bb 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp index 47494fc459a..8e5edbe38a0 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp index e5c3e25352c..45bc2b9ca37 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp @@ -12,8 +12,12 @@ #include <bitset> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp index 1a2d70613e1..084dc9f8d46 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/test.pass.cpp @@ -15,6 +15,10 @@ #include "test_macros.h" +#if defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. +#endif + template <std::size_t N> std::bitset<N> make_bitset() diff --git a/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp index 5b2958cca52..37824d81b5a 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp @@ -26,8 +26,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp index d86a10c6df1..e58c72016ee 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp index 0a8024d5eb9..244a2ba541d 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> diff --git a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp index 449115edd75..e601b26cf4c 100644 --- a/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp +++ b/libcxx/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp @@ -13,8 +13,12 @@ #include <cstdlib> #include <cassert> -#if defined(__clang__) +#include "test_macros.h" + +#if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" +#elif defined(TEST_COMPILER_C1XX) +#pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #endif template <std::size_t N> |