STL_MSFT created this revision. [libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more fine-grained manner.
https://reviews.llvm.org/D32926 Files: test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp test/std/utilities/template.bitset/bitset.cons/default.pass.cpp test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp test/std/utilities/template.bitset/bitset.members/count.pass.cpp test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp test/std/utilities/template.bitset/bitset.members/index.pass.cpp test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp test/std/utilities/template.bitset/bitset.members/test.pass.cpp test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp test/support/msvc_stdlib_force_include.hpp
Index: test/support/msvc_stdlib_force_include.hpp =================================================================== --- test/support/msvc_stdlib_force_include.hpp +++ test/support/msvc_stdlib_force_include.hpp @@ -57,7 +57,6 @@ #pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored #pragma warning(disable: 4521) // multiple copy constructors specified #pragma warning(disable: 4702) // unreachable code - #pragma warning(disable: 6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. #pragma warning(disable: 28251) // Inconsistent annotation for 'new': this instance has no annotations. #endif // !defined(__clang__) Index: test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/test.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/test.pass.cpp +++ 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() Index: test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/index.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/index.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp +++ 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() Index: test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.members/count.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.members/count.pass.cpp +++ 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> Index: test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp +++ 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() { Index: test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp +++ 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() { Index: test/std/utilities/template.bitset/bitset.cons/default.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.cons/default.pass.cpp +++ 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() { Index: test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp +++ 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() {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits