[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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6635 bytes
Desc: not available
More information about the cfe-commits