[libcxx-commits] [libcxx] [libc++] Move std::abs into __math/abs.h (PR #139586)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 15 09:24:09 PDT 2025
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 HEAD~1 HEAD --extensions h,cpp -- libcxx/include/__math/abs.h libcxx/include/math.h libcxx/include/stdlib.h libcxx/test/std/numerics/c.math/abs.verify.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/numerics/c.math/abs.verify.cpp b/libcxx/test/std/numerics/c.math/abs.verify.cpp
index cc30112f0..9e5bfda52 100644
--- a/libcxx/test/std/numerics/c.math/abs.verify.cpp
+++ b/libcxx/test/std/numerics/c.math/abs.verify.cpp
@@ -13,10 +13,12 @@ void f() {
(void)std::abs(ui); // expected-error {{call to 'abs' is ambiguous}}
unsigned char uc = -5;
- (void)std::abs(uc); // expected-warning 0-1 {{taking the absolute value of unsigned type 'unsigned char' has no effect}}
+ (void)std::abs(
+ uc); // expected-warning 0-1 {{taking the absolute value of unsigned type 'unsigned char' has no effect}}
unsigned short us = -5;
- (void)std::abs(us); // expected-warning 0-1 {{taking the absolute value of unsigned type 'unsigned short' has no effect}}
+ (void)std::abs(
+ us); // expected-warning 0-1 {{taking the absolute value of unsigned type 'unsigned short' has no effect}}
unsigned long ul = -5;
(void)std::abs(ul); // expected-error {{call to 'abs' is ambiguous}}
``````````
</details>
https://github.com/llvm/llvm-project/pull/139586
More information about the libcxx-commits
mailing list