This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 2/7.
ClosedPublic

Authored by STL_MSFT on Dec 7 2016, 2:00 PM.

Details

Summary

[libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 2/7.

These tests for some guy's transparent operator functors were needlessly truncating their
double results to int. Preserving the doubleness makes compilers happier. I'm following
existing practice by adding an "// exact in binary" comment when the result isn't a whole number.
(The changes from 6 to 6.0 and so forth are stylistic, not critical.)

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 80653.Dec 7 2016, 2:00 PM
STL_MSFT retitled this revision from to [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 2/7..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Dec 7 2016, 11:00 PM
EricWF edited edge metadata.
This revision is now accepted and ready to land.Dec 7 2016, 11:00 PM
STL_MSFT closed this revision.Dec 8 2016, 1:57 PM