[libc++] Add [[nodiscard]] extensions in <math.h>
There are quite a few functions marked `[[gnu::const]]` inside the compiler. This patch adds `[[nodiscard]]` to libc++-provided overloads of these functions to match the diagnostics produced.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D140855
NOKEYCHECK=True
GitOrigin-RevId: 633927db844e47c87dd93198e2c2763dd10f668f
diff --git a/docs/UsingLibcxx.rst b/docs/UsingLibcxx.rst
index 5cf608e..6fac013 100644
--- a/docs/UsingLibcxx.rst
+++ b/docs/UsingLibcxx.rst
@@ -455,6 +455,29 @@
* ``identity::operator()``
* ``to_integer``
* ``to_underlying``
+* ``signbit``
+* ``fpclassify``
+* ``isfinite``
+* ``isinf``
+* ``isnan``
+* ``isnormal``
+* ``isgreater``
+* ``isgreaterequal``
+* ``isless``
+* ``islessequal``
+* ``islessgreater``
+* ``isunordered``
+* ``ceil``
+* ``fabs``
+* ``floor``
+* ``cbrt``
+* ``copysign``
+* ``fmax``
+* ``fmin``
+* ``nearbyint``
+* ``rint``
+* ``round``
+* ``trunc``
Extended integral type support
------------------------------