[libcxx-commits] [libcxx] [libc++] Fix acceptance of convertible-to-{float, double, long double} in std::isfinite() (PR #98841)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 14 15:17:17 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 93d2b23ad2b96ed47b68a7e3c142cb306f418f2a 9df4a55da66dea7c875530fc11c25e648426cfb5 --extensions cpp,h -- libcxx/include/__math/traits.h libcxx/test/std/numerics/c.math/isfinite.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/numerics/c.math/isfinite.pass.cpp b/libcxx/test/std/numerics/c.math/isfinite.pass.cpp
index 56d9550348..fdaa909978 100644
--- a/libcxx/test/std/numerics/c.math/isfinite.pass.cpp
+++ b/libcxx/test/std/numerics/c.math/isfinite.pass.cpp
@@ -63,33 +63,27 @@ struct TestInt {
};
struct ConvertibleFloat {
- int value;
+ int value;
- ConvertibleFloat(int v) : value(v) {}
+ ConvertibleFloat(int v) : value(v) {}
- operator float() const {
- return static_cast<float>(value);
- }
+ operator float() const { return static_cast<float>(value); }
};
struct ConvertibleDouble {
- int value;
+ int value;
- ConvertibleDouble(int v) : value(v) {}
+ ConvertibleDouble(int v) : value(v) {}
- operator double() const {
- return static_cast<double>(value);
- }
+ operator double() const { return static_cast<double>(value); }
};
struct ConvertibleLongDouble {
- int value;
+ int value;
- ConvertibleLongDouble(int v) : value(v) {}
+ ConvertibleLongDouble(int v) : value(v) {}
- operator long double() const {
- return static_cast<long double>(value);
- }
+ operator long double() const { return static_cast<long double>(value); }
};
int main(int, char**) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/98841
More information about the libcxx-commits
mailing list