Page MenuHomePhabricator

[libcxx] [test] Fix Clang -Wunused-local-typedef, MSVC C4800, missing cassert.
ClosedPublic

Authored by STL_MSFT on Nov 13 2018, 7:35 PM.

Details

Summary

[libcxx] [test] Fix Clang -Wunused-local-typedef, MSVC C4800, missing cassert.

test/std/containers/sequences/vector.bool/move.pass.cpp
Fix MSVC warning C4800. This was implicitly converting [1, 3] to bool, which triggers an MSVC warning. The test should just pass true, which is simpler, has the same behavior, and avoids the warning. (This is a library test, not a compiler test, and the conversion happens before calling push_back, so passing [1, 3] isn't interesting in any way. This resembles a previous change to stop passing 1 == 1 in the vector<bool> tests.)

test/std/containers/associative/map/map.modifiers/merge.pass.cpp
test/std/containers/associative/multimap/multimap.modifiers/merge.pass.cpp
test/std/containers/associative/multiset/merge.pass.cpp
test/std/containers/associative/set/merge.pass.cpp
test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp
test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp
test/std/containers/unord/unord.multiset/merge.pass.cpp
test/std/containers/unord/unord.set/merge.pass.cpp
Include <cassert> for assert(). This fixes compiler errors with MSVC's STL.

test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp
test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp
test/std/containers/unord/unord.multiset/merge.pass.cpp
test/std/containers/unord/unord.set/merge.pass.cpp
Fix Clang -Wunused-local-typedef warnings. C++11's [hash.requirements] never required these typedefs from users.

Diff Detail

Event Timeline

STL_MSFT created this revision.Nov 13 2018, 7:35 PM
EricWF accepted this revision.Nov 13 2018, 9:16 PM
This revision is now accepted and ready to land.Nov 13 2018, 9:16 PM

Remind me once this lands to turn on -Wunused-local-typedef so we don't regress.

mclow.lists accepted this revision.Nov 14 2018, 7:07 AM