[PATCH] D28592: [libcxx] [test] Fix MSVC warning C4127 "conditional expression is constant".
Stephan T. Lavavej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 11 19:05:07 PST 2017
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
[libcxx] [test] Fix MSVC warning C4127 "conditional expression is constant".
MSVC has a compiler warning (enabled at /https://reviews.llvm.org/W4) that's potentially useful,
although slightly annoying to library devs who know what they're doing.
In the latest version of the compiler, the warning is suppressed when the
compiler sees simple tests like "if (name_of_thing)", so extracting comparison
expressions into named constants is a workaround. This is useful for ensuring
that libraries are C4127-clean.
https://reviews.llvm.org/D28592
Files:
test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
test/std/utilities/function.objects/unord.hash/enum.pass.cpp
test/std/utilities/function.objects/unord.hash/integral.pass.cpp
test/std/utilities/template.bitset/bitset.members/all.pass.cpp
test/std/utilities/template.bitset/bitset.members/any.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/none.pass.cpp
test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28592.84067.patch
Type: text/x-patch
Size: 6635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170112/3eccdd55/attachment.bin>
More information about the cfe-commits
mailing list