This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 10/12.
ClosedPublic

Authored by STL_MSFT on Nov 22 2016, 4:54 PM.

Details

Summary

[libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 10/12.

Add static_cast<int>. In these cases, the values are guaranteed to be small-ish,
and they're being compared to int elements.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 78993.Nov 22 2016, 4:54 PM
STL_MSFT retitled this revision from to [libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 10/12..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF edited edge metadata.Dec 2 2016, 11:37 PM

LGTM.

Feel free to address the inline comments or not.

test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
55

Wouldn't it make more sense to change these loop indexes to be int instead of unsigned?

EricWF accepted this revision.Dec 2 2016, 11:38 PM
EricWF edited edge metadata.
This revision is now accepted and ready to land.Dec 2 2016, 11:38 PM
STL_MSFT updated this revision to Diff 80347.Dec 5 2016, 5:11 PM
STL_MSFT edited edge metadata.

Changed loop indices to int as requested.

STL_MSFT closed this revision.Dec 5 2016, 5:27 PM

Thanks, r288747.