This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.
ClosedPublic

Authored by STL_MSFT on Jan 25 2017, 10:30 AM.

Details

Summary

[libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.

Mark typedefs as LIBCPP_ONLY when their only usage is within LIBCPP_STATIC_ASSERT.

test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
Additionally deal with conditional compilation.

test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
Additionally deal with typedefs used by other typedefs.

Diff Detail

Event Timeline

STL_MSFT created this revision.Jan 25 2017, 10:30 AM
EricWF edited edge metadata.Feb 4 2017, 2:52 PM

Since all of these changes are for libc++ specific tests I would much rather see changes of this form:

#if defined(_LIBCPP_VERSION)
{
  typedef foo bar;
  static_assert(baz, "");
}
#endif

I think that's a lot nicer than wrapping every statement in the block in a LIBCPP_ONLY.
If you agree feel free to commit those changes without review.

STL_MSFT accepted this revision.Feb 5 2017, 3:04 PM

Committed with the requested changes. Thanks!

This revision is now accepted and ready to land.Feb 5 2017, 3:04 PM
STL_MSFT closed this revision.Feb 5 2017, 3:04 PM