BillyONeal created this revision.

STL reviewed my [[nodiscard]] changes and suggested a ton more places. These 
are the associated test changes in libcxx.


https://reviews.llvm.org/D39080

Files:
  test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp
  test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp
  test/std/containers/associative/map/map.access/at.pass.cpp
  test/std/containers/unord/unord.map/unord.map.elem/at.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp
  test/std/numerics/rand/rand.device/eval.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp
  test/std/re/re.alg/re.alg.search/grep.pass.cpp
  test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp
  
test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp
  
test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp
  
test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp
  
test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp
  
test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp
  
test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp
  test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
  
test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
  
test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
  
test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp

Index: test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
===================================================================
--- test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
+++ test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
@@ -112,11 +112,11 @@
     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));
Index: test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
===================================================================
--- test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
+++ test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
@@ -134,7 +134,7 @@
 
 #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); }
Index: test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
===================================================================
--- test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
+++ test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
@@ -23,7 +23,7 @@
 {
     std::allocator<T> a;
     try {
-        a.allocate(count);
+        (void)a.allocate(count);
         assert(false);
     } catch (const std::exception &) {
     }
Index: test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
===================================================================
--- test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
+++ test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
@@ -80,16 +80,16 @@
 {
 #if !defined(TEST_HAS_NO_EXCEPTIONS)
     try {
-        any_cast<Type>(a);
+        (void)any_cast<Type>(a);
         assert(false);
     } catch (bad_any_cast const &) {
             // do nothing
     } catch (...) {
         assert(false);
     }
 
     try {
-        any_cast<ConstT>(static_cast<any const&>(a));
+        (void)any_cast<ConstT>(static_cast<any const&>(a));
         assert(false);
     } catch (bad_any_cast const &) {
             // do nothing
@@ -103,7 +103,7 @@
             typename std::remove_reference<Type>::type&&,
             Type
         >::type;
-        any_cast<RefType>(static_cast<any&&>(a));
+        (void)any_cast<RefType>(static_cast<any&&>(a));
         assert(false);
     } catch (bad_any_cast const &) {
             // do nothing
Index: test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp
===================================================================
--- test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp
+++ test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_until.pass.cpp
@@ -48,7 +48,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_until(Clock::now());
+        (void)lk.try_lock_until(Clock::now());
         assert(false);
     }
     catch (std::system_error& e)
@@ -64,7 +64,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_until(Clock::now());
+        (void)lk.try_lock_until(Clock::now());
         assert(false);
     }
     catch (std::system_error& e)
Index: test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp
===================================================================
--- test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp
+++ test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock_for.pass.cpp
@@ -48,7 +48,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_for(ms(5));
+        (void)lk.try_lock_for(ms(5));
         assert(false);
     }
     catch (std::system_error& e)
@@ -64,7 +64,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_for(ms(5));
+        (void)lk.try_lock_for(ms(5));
         assert(false);
     }
     catch (std::system_error& e)
Index: test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp
===================================================================
--- test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp
+++ test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/try_lock.pass.cpp
@@ -43,7 +43,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock();
+        (void)lk.try_lock();
         assert(false);
     }
     catch (std::system_error& e)
@@ -59,7 +59,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock();
+        (void)lk.try_lock();
         assert(false);
     }
     catch (std::system_error& e)
Index: test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp
===================================================================
--- test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp
+++ test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp
@@ -49,7 +49,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_until(Clock::now());
+        (void)lk.try_lock_until(Clock::now());
         assert(false);
     }
     catch (std::system_error& e)
@@ -65,7 +65,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_until(Clock::now());
+        (void)lk.try_lock_until(Clock::now());
         assert(false);
     }
     catch (std::system_error& e)
Index: test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp
===================================================================
--- test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp
+++ test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp
@@ -49,7 +49,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_for(ms(5));
+        (void)lk.try_lock_for(ms(5));
         assert(false);
     }
     catch (std::system_error& e)
@@ -65,7 +65,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock_for(ms(5));
+        (void)lk.try_lock_for(ms(5));
         assert(false);
     }
     catch (std::system_error& e)
Index: test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp
===================================================================
--- test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp
+++ test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp
@@ -44,7 +44,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock();
+        (void)lk.try_lock();
         assert(false);
     }
     catch (std::system_error& e)
@@ -60,7 +60,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
     try
     {
-        lk.try_lock();
+        (void)lk.try_lock();
         assert(false);
     }
     catch (std::system_error& e)
Index: test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp
===================================================================
--- test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp
+++ test/std/thread/thread.mutex/thread.lock.algorithm/try_lock.pass.cpp
@@ -102,7 +102,7 @@
         L2 l1;
         try
         {
-            std::try_lock(l0, l1);
+            (void)std::try_lock(l0, l1);
             assert(false);
         }
         catch (int)
@@ -116,7 +116,7 @@
         L0 l1;
         try
         {
-            std::try_lock(l0, l1);
+            (void)std::try_lock(l0, l1);
             assert(false);
         }
         catch (int)
@@ -152,7 +152,7 @@
         L2 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -206,7 +206,7 @@
         L2 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -222,7 +222,7 @@
         L0 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -238,7 +238,7 @@
         L0 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -301,7 +301,7 @@
         L1 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -317,7 +317,7 @@
         L0 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -333,7 +333,7 @@
         L2 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -349,7 +349,7 @@
         L2 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -365,7 +365,7 @@
         L1 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -381,7 +381,7 @@
         L2 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -406,7 +406,7 @@
         L1 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -440,7 +440,7 @@
         L1 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
@@ -456,7 +456,7 @@
         L0 l2;
         try
         {
-            std::try_lock(l0, l1, l2);
+            (void)std::try_lock(l0, l1, l2);
             assert(false);
         }
         catch (int)
Index: test/std/re/re.alg/re.alg.search/grep.pass.cpp
===================================================================
--- test/std/re/re.alg/re.alg.search/grep.pass.cpp
+++ test/std/re/re.alg/re.alg.search/grep.pass.cpp
@@ -33,7 +33,7 @@
             std::regex::flag_type flag = std::regex_constants::grep;
             std::string s((const char *)data, size);
             std::regex re(s, flag);
-            std::regex_match(s, re);
+            (void)std::regex_match(s, re);
         }
         catch (std::regex_error &) {}
     }
Index: test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.sub/discard.pass.cpp
@@ -25,9 +25,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
@@ -39,9 +39,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
Index: test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.sub/copy.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::ranlux24_base E;
     E e1;
-    e1();
+    (void)e1();
     E e2 = e1;
     assert(e1 == e2);
     assert(e1() == e2());
@@ -37,7 +37,7 @@
 {
     typedef std::ranlux48_base E;
     E e1;
-    e1();
+    (void)e1();
     E e2(e1);
     assert(e1 == e2);
     assert(e1() == e2());
Index: test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.sub/assign.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::ranlux24_base E;
     E e1(2);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
@@ -38,7 +38,7 @@
 {
     typedef std::ranlux48_base E;
     E e1(3);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
Index: test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.mers/discard.pass.cpp
@@ -28,9 +28,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
@@ -42,9 +42,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
Index: test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.mers/copy.pass.cpp
@@ -24,7 +24,7 @@
 {
     typedef std::mt19937 E;
     E e1;
-    e1();
+    (void)e1();
     E e2 = e1;
     assert(e1 == e2);
     assert(e1() == e2());
@@ -39,7 +39,7 @@
 {
     typedef std::mt19937_64 E;
     E e1;
-    e1();
+    (void)e1();
     E e2(e1);
     assert(e1 == e2);
     assert(e1() == e2());
Index: test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.mers/assign.pass.cpp
@@ -24,7 +24,7 @@
 {
     typedef std::mt19937 E;
     E e1(2);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
@@ -40,7 +40,7 @@
 {
     typedef std::mt19937_64 E;
     E e1(3);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
Index: test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.lcong/discard.pass.cpp
@@ -47,13 +47,13 @@
     assert(e1 == e2);
     e1.discard(1);
     assert(e1 != e2);
-    e2();
+    (void)e2();
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
Index: test/std/numerics/rand/rand.device/eval.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.device/eval.pass.cpp
+++ test/std/numerics/rand/rand.device/eval.pass.cpp
@@ -38,7 +38,7 @@
     try
     {
         std::random_device r("/dev/null");
-        r();
+        (void)r();
         LIBCPP_ASSERT(false);
     }
     catch (const std::system_error&)
Index: test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.shuf/discard.pass.cpp
@@ -25,9 +25,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
Index: test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_move.pass.cpp
@@ -25,8 +25,10 @@
         Engine e;
         Engine e0 = e;
         Adaptor a(std::move(e0));
-        for (unsigned k = 0; k <= Adaptor::table_size; ++k)
-            e();
+        for (unsigned k = 0; k <= Adaptor::table_size; ++k) {
+            (void)e();
+        }
+
         assert(a.base() == e);
     }
 }
Index: test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.shuf/ctor_engine_copy.pass.cpp
@@ -24,8 +24,10 @@
         typedef std::knuth_b Adaptor;
         Engine e;
         Adaptor a(e);
-        for (unsigned k = 0; k <= Adaptor::table_size; ++k)
-            e();
+        for (unsigned k = 0; k <= Adaptor::table_size; ++k) {
+            (void)e();
+        }
+
         assert(a.base() == e);
     }
 }
Index: test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.shuf/copy.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::knuth_b E;
     E e1;
-    e1();
+    (void)e1();
     E e2 = e1;
     assert(e1 == e2);
     assert(e1() == e2());
Index: test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.shuf/assign.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::knuth_b E;
     E e1(2);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
Index: test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.ibits/discard.pass.cpp
@@ -25,9 +25,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
@@ -39,9 +39,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
Index: test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.ibits/copy.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::independent_bits_engine<std::ranlux24, 32, unsigned> E;
     E e1;
-    e1();
+    (void)e1();
     E e2 = e1;
     assert(e1 == e2);
     assert(e1() == e2());
@@ -37,7 +37,7 @@
 {
     typedef std::independent_bits_engine<std::ranlux48, 64, unsigned long long> E;
     E e1;
-    e1();
+    (void)e1();
     E e2 = e1;
     assert(e1 == e2);
     assert(e1() == e2());
Index: test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.ibits/assign.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::independent_bits_engine<std::ranlux24, 32, unsigned> E;
     E e1(2);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
@@ -38,7 +38,7 @@
 {
     typedef std::independent_bits_engine<std::ranlux48, 64, unsigned long long> E;
     E e1(3);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
Index: test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.disc/discard.pass.cpp
@@ -25,9 +25,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
@@ -39,9 +39,9 @@
     assert(e1 == e2);
     e1.discard(3);
     assert(e1 != e2);
-    e2();
-    e2();
-    e2();
+    (void)e2();
+    (void)e2();
+    (void)e2();
     assert(e1 == e2);
 }
 
Index: test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.disc/copy.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::ranlux24 E;
     E e1;
-    e1();
+    (void)e1();
     E e2 = e1;
     assert(e1 == e2);
     assert(e1() == e2());
@@ -37,7 +37,7 @@
 {
     typedef std::ranlux48 E;
     E e1;
-    e1();
+    (void)e1();
     E e2 = e1;
     assert(e1 == e2);
     assert(e1() == e2());
Index: test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp
===================================================================
--- test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.disc/assign.pass.cpp
@@ -22,7 +22,7 @@
 {
     typedef std::ranlux24 E;
     E e1(2);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
@@ -38,7 +38,7 @@
 {
     typedef std::ranlux48 E;
     E e1(3);
-    e1();
+    (void)e1();
     E e2(5);
     e2 = e1;
     assert(e1 == e2);
Index: test/std/containers/unord/unord.map/unord.map.elem/at.pass.cpp
===================================================================
--- test/std/containers/unord/unord.map/unord.map.elem/at.pass.cpp
+++ test/std/containers/unord/unord.map/unord.map.elem/at.pass.cpp
@@ -72,7 +72,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
         try
         {
-            c.at(11);
+            (void)c.at(11);
             assert(false);
         }
         catch (std::out_of_range&)
@@ -130,7 +130,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
         try
         {
-            c.at(11);
+            (void)c.at(11);
             assert(false);
         }
         catch (std::out_of_range&)
Index: test/std/containers/associative/map/map.access/at.pass.cpp
===================================================================
--- test/std/containers/associative/map/map.access/at.pass.cpp
+++ test/std/containers/associative/map/map.access/at.pass.cpp
@@ -46,7 +46,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
         try
         {
-            m.at(6);
+            (void)m.at(6);
             assert(false);
         }
         catch (std::out_of_range&)
@@ -79,7 +79,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
         try
         {
-            m.at(6);
+            (void)m.at(6);
             assert(false);
         }
         catch (std::out_of_range&)
@@ -115,7 +115,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
         try
         {
-            m.at(6);
+            (void)m.at(6);
             assert(false);
         }
         catch (std::out_of_range&)
@@ -148,7 +148,7 @@
 #ifndef TEST_HAS_NO_EXCEPTIONS
         try
         {
-            m.at(6);
+            (void)m.at(6);
             assert(false);
         }
         catch (std::out_of_range&)
Index: test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp
===================================================================
--- test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp
+++ test/std/algorithms/alg.nonmodifying/alg.search/search_n_pred.pass.cpp
@@ -142,7 +142,7 @@
     count_equal::count = 0;
 
     // Check that we properly convert the size argument to an integral.
-    std::search_n(Iter(ic), Iter(ic+sc), UserDefinedIntegral<unsigned>(4), 0, count_equal());
+    (void)std::search_n(Iter(ic), Iter(ic+sc), UserDefinedIntegral<unsigned>(4), 0, count_equal());
     count_equal::count = 0;
 }
 
Index: test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp
===================================================================
--- test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp
+++ test/std/algorithms/alg.nonmodifying/alg.search/search_n.pass.cpp
@@ -66,7 +66,7 @@
     assert(std::search_n(Iter(ic), Iter(ic+sc), 4, 0) == Iter(ic+sc));
 
     // Check that we properly convert the size argument to an integral.
-    std::search_n(Iter(ic), Iter(ic+sc), UserDefinedIntegral<unsigned>(0), 0);
+    (void)std::search_n(Iter(ic), Iter(ic+sc), UserDefinedIntegral<unsigned>(0), 0);
 }
 
 int main()
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D39080: [l... Billy Robert O'Neal III via Phabricator via cfe-commits

Reply via email to