From ba40b0566ff0e835bc8234a4651e8cbf76181c3e Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Tue, 21 Nov 2017 21:37:26 +0000 Subject: Change (void) casts to TEST_IGNORE_NODISCARD, as requested by Eric. Reviewed as https://reviews.llvm.org/D40065 llvm-svn: 318804 --- .../memory/default.allocator/allocator.members/allocate.size.pass.cpp | 2 +- .../util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libcxx/test/std/utilities/memory') diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp index e77e7d82ad5..34cbb8dc537 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp @@ -23,7 +23,7 @@ void test_max(size_t count) { std::allocator a; try { - (void)a.allocate(count); + TEST_IGNORE_NODISCARD a.allocate(count); assert(false); } catch (const std::exception &) { } diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp index d678bdedefc..8bd8993e5be 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp @@ -134,7 +134,7 @@ int main() #ifndef TEST_HAS_NO_EXCEPTIONS try { - (void)ptr->shared_from_this(); + TEST_IGNORE_NODISCARD ptr->shared_from_this(); assert(false); } catch (std::bad_weak_ptr const&) { } catch (...) { assert(false); } -- cgit v1.2.3