llvm-project/libcxx
Stephan T. Lavavej 3d26ee2921 [libcxx] [test] Fix MSVC warnings C4127 and C6326 about constants.
MSVC has compiler warnings C4127 "conditional expression is constant" (enabled
by /W4) and C6326 "Potential comparison of a constant with another constant"
(enabled by /analyze). They're potentially useful, although they're slightly
annoying to library devs who know what they're doing. In the latest version of
the compiler, C4127 is suppressed when the compiler sees simple tests like
"if (name_of_thing)", so extracting comparison expressions into named
constants is a workaround. At the same time, using std::integral_constant
avoids C6326, which doesn't look at template arguments.

test/std/containers/sequences/vector.bool/emplace.pass.cpp
Replace 1 == 1 with true, which is the same as far as the library is concerned.

Fixes D28837.

llvm-svn: 292432
2017-01-18 20:09:56 +00:00
..
benchmarks improve performance of string::find 2016-12-30 18:01:36 +00:00
cmake Improve CMake and LIT support for Windows 2017-01-16 20:47:35 +00:00
docs [libc++] Introduce _LIBCPP_EXTERN_VIS to fix __libcpp_debug_function link errors 2017-01-16 21:01:00 +00:00
include Fix filesystem::path assignment from {} 2017-01-18 05:48:55 +00:00
lib Allow sym_diff.py to report non-zero for non-breaking ABI changes 2017-01-18 00:05:01 +00:00
src Add ABI option to remove recently inlined __shared_count functions from the library. 2017-01-17 03:16:26 +00:00
test [libcxx] [test] Fix MSVC warnings C4127 and C6326 about constants. 2017-01-18 20:09:56 +00:00
utils Allow sym_diff.py to report non-zero for non-breaking ABI changes 2017-01-18 00:05:01 +00:00
www Mark 'constexpr char_traits' as complete. 2017-01-14 05:55:17 +00:00
.arcconfig Upgrade arcconfig to use https 2016-07-18 02:02:49 +00:00
.clang-format Tweak .clang-format configuration. 2017-01-14 05:43:02 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
CMakeLists.txt Don't strip -m32 from the user provide command line flags. This fixes the compiler-rt 32 bit sanitizer build 2017-01-17 23:27:56 +00:00
CREDITS.TXT Added "Michael Park" to `CREDITS.TXT`. 2017-01-07 10:19:24 +00:00
LICENSE.TXT Update year to 2017 2017-01-03 11:20:43 +00:00
NOTES.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00
TODO.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00