Files
clang-p2996/libcxx/test/std/containers/sequences/array
Stephan T. Lavavej 1c7607e8ee [libc++][test] Fix MSVC warning C4127 in array.cons/initialization.pass.cpp (#79793)
This fixes MSVC warning C4127: conditional expression is constant.

Testing `TEST_STD_AT_LEAST_20_OR_RUNTIME_EVALUATED` by itself doesn't
emit this warning, but the condition here is more complicated. I'm
expanding the macro and mechanically simplifying the resulting code.

(Yeah, this warning is often annoying, and I introduced
`TEST_STD_AT_LEAST_20_OR_RUNTIME_EVALUATED` to avoid this warning
elsewhere, so it's disappointing that it doesn't make the compiler happy
here. If this change is undesirable, I can replace it with
`ADDITIONAL_COMPILE_FLAGS(cl-style-warnings)`, but ideally I'd like to
avoid having to suppress it.)

---------

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2024-03-09 02:31:58 -08:00
..