diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-02-05 22:47:09 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-02-05 22:47:09 +0000 |
commit | 03fe6e2da23ed6e8317bda3b81d0ac3bb36009b3 (patch) | |
tree | 52c6a892068411ceff8d4736eb40dcaa8a60c324 /libcxx/test/std/containers/container.adaptors | |
parent | 8eb1f315ac2e137374632ab10c5832ed4cf60910 (diff) | |
download | bcm5719-llvm-03fe6e2da23ed6e8317bda3b81d0ac3bb36009b3.tar.gz bcm5719-llvm-03fe6e2da23ed6e8317bda3b81d0ac3bb36009b3.zip |
[libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.
Guard typedefs and static_asserts with _LIBCPP_VERSION.
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.
Fixes D29135.
llvm-svn: 294154
Diffstat (limited to 'libcxx/test/std/containers/container.adaptors')
5 files changed, 15 insertions, 5 deletions
diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp index c79feb93eb6..5dec2b910fb 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp @@ -25,8 +25,10 @@ int main() { +#if defined(_LIBCPP_VERSION) { typedef std::priority_queue<MoveOnly> C; - LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, ""); + static_assert(std::is_nothrow_default_constructible<C>::value, ""); } +#endif // _LIBCPP_VERSION } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp index 43045893fe0..781d7401612 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp @@ -24,8 +24,10 @@ int main() { +#if defined(_LIBCPP_VERSION) { typedef std::queue<MoveOnly> C; - LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, ""); + static_assert(std::is_nothrow_default_constructible<C>::value, ""); } +#endif // _LIBCPP_VERSION } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp index c8becb3ca98..58c8f9ddfad 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp @@ -24,8 +24,10 @@ int main() { +#if defined(_LIBCPP_VERSION) { typedef std::queue<MoveOnly> C; - LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, ""); + static_assert(std::is_nothrow_move_constructible<C>::value, ""); } +#endif // _LIBCPP_VERSION } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp index 2d1f9437fc4..2e217c545f9 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp @@ -24,8 +24,10 @@ int main() { +#if defined(_LIBCPP_VERSION) { typedef std::stack<MoveOnly> C; - LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, ""); + static_assert(std::is_nothrow_default_constructible<C>::value, ""); } +#endif // _LIBCPP_VERSION } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp index c34b7e07000..af6793f465a 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp @@ -24,8 +24,10 @@ int main() { +#if defined(_LIBCPP_VERSION) { typedef std::stack<MoveOnly> C; - LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, ""); + static_assert(std::is_nothrow_move_constructible<C>::value, ""); } +#endif // _LIBCPP_VERSION } |