[libcxx-commits] [libcxx] d28193f - [libc++][test] Add `void` cast to a discarded call to `remquo` (#213849)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 4 06:59:39 PDT 2026


Author: A. Jiang
Date: 2026-08-04T21:59:34+08:00
New Revision: d28193fa1ff64027cc5547355e9d70785268aec8

URL: https://github.com/llvm/llvm-project/commit/d28193fa1ff64027cc5547355e9d70785268aec8
DIFF: https://github.com/llvm/llvm-project/commit/d28193fa1ff64027cc5547355e9d70785268aec8.diff

LOG: [libc++][test] Add `void` cast to a discarded call to `remquo` (#213849)

For calls to `remquo`, the return values are generally expected to be
used, while it is rare to only use the value written via the pointer
parameter. Moreover, some implementors already planned to apply
`[[nodiscard]]` to `remquo`, see also https://llvm.org/PR171763. As a
result, it is perhaps better to add `void` cast to the discarded call to
`remquo` in the test file.

Added: 
    

Modified: 
    libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
index d3f3835122374..cc7cbd2e38c32 100644
--- a/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
@@ -862,7 +862,7 @@ struct test_two_args {
     (void)::remainder(T(), U());
     int ip;
     ASSERT_SAME_TYPE(decltype(::remquo(T(), U(), &ip)), PromoteResult);
-    ::remquo(T(), U(), &ip);
+    (void)::remquo(T(), U(), &ip);
   }
 };
 


        


More information about the libcxx-commits mailing list