From 03fe6e2da23ed6e8317bda3b81d0ac3bb36009b3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 5 Feb 2017 22:47:09 +0000 Subject: [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 --- .../string.nonmembers/string.special/swap_noexcept.pass.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp') diff --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp index 757d5eeb2dc..88c1bee3251 100644 --- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp @@ -59,10 +59,12 @@ int main() typedef std::string C; static_assert(noexcept(swap(std::declval(), std::declval())), ""); } +#if defined(_LIBCPP_VERSION) { typedef std::basic_string, test_allocator> C; - LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval(), std::declval())), ""); + static_assert(noexcept(swap(std::declval(), std::declval())), ""); } +#endif // _LIBCPP_VERSION { typedef std::basic_string, some_alloc> C; #if TEST_STD_VER >= 14 -- cgit v1.2.3