summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/memory
diff options
context:
space:
mode:
authorBilly Robert O'Neal III <bion@microsoft.com>2017-11-15 07:45:07 +0000
committerBilly Robert O'Neal III <bion@microsoft.com>2017-11-15 07:45:07 +0000
commit1c240a89ffa0d7ca0afab6e36c8f8a58ec73e52f (patch)
tree2caff257dfc12ccf3f21c8e570b1e8b2c525bc1f /libcxx/test/std/utilities/memory
parent83252766f906799d68a46af39687d7a60fa8530a (diff)
downloadbcm5719-llvm-1c240a89ffa0d7ca0afab6e36c8f8a58ec73e52f.tar.gz
bcm5719-llvm-1c240a89ffa0d7ca0afab6e36c8f8a58ec73e52f.zip
Tolerate even more [[nodiscard]] in the STL. Reviewed as https://reviews.llvm.org/D39080
llvm-svn: 318277
Diffstat (limited to 'libcxx/test/std/utilities/memory')
-rw-r--r--libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp2
-rw-r--r--libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp2
-rw-r--r--libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp10
3 files changed, 7 insertions, 7 deletions
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 768d4187843..e77e7d82ad5 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<T> a;
try {
- a.allocate(count);
+ (void)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 30a4933811e..d678bdedefc 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 {
- ptr->shared_from_this();
+ (void)ptr->shared_from_this();
assert(false);
} catch (std::bad_weak_ptr const&) {
} catch (...) { assert(false); }
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
index 73cf073362f..b7ea8d4dc6d 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
@@ -112,11 +112,11 @@ int main()
std::weak_ptr<int> wp1;
std::owner_less<> cmp;
- cmp(sp1, sp2);
- cmp(sp1, wp1);
- cmp(sp1, sp3);
- cmp(wp1, sp1);
- cmp(wp1, wp1);
+ assert(!cmp(sp1, sp2));
+ assert(!cmp(sp1, wp1));
+ assert(!cmp(sp1, sp3));
+ assert(!cmp(wp1, sp1));
+ assert(!cmp(wp1, wp1));
ASSERT_NOEXCEPT(cmp(sp1, sp1));
ASSERT_NOEXCEPT(cmp(sp1, wp1));
ASSERT_NOEXCEPT(cmp(wp1, sp1));
OpenPOWER on IntegriCloud