[libcxx-commits] [libcxx] [libc++] [test] Fix MSVC warnings (PR #93257)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 23 17:12:47 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 dc78329dbbf5b9988b02cab9092ccca32c6517bc 190a6343ab73aacf6402b6ccd47d17135c2d98e4 -- libcxx/test/std/atomics/atomics.ref/compare_exchange_strong.pass.cpp libcxx/test/std/atomics/atomics.ref/compare_exchange_weak.pass.cpp libcxx/test/std/atomics/atomics.ref/wait.pass.cpp libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp libcxx/test/support/msvc_stdlib_force_include.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
index f9e49d02b8..ecc544dd94 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
@@ -58,8 +58,7 @@ int main(int, char**)
LIBCPP_ASSERT(msg.rfind("Error -1 occurred", 0) == 0 // AIX
|| msg.rfind("No error information", 0) == 0 // Musl
|| msg.rfind("Unknown error", 0) == 0 // Glibc
- || (is_newlib && msg.empty())
- );
+ || (is_newlib && msg.empty()));
assert(errno == E2BIG);
}
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
index a14d6cd6cb..913df951ca 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
@@ -64,8 +64,7 @@ int main(int, char**) {
LIBCPP_ASSERT(msg.rfind("Error -1 occurred", 0) == 0 // AIX
|| msg.rfind("No error information", 0) == 0 // Musl
|| msg.rfind("Unknown error", 0) == 0 // Glibc
- || (is_newlib && msg.empty())
- );
+ || (is_newlib && msg.empty()));
assert(errno == E2BIG);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/93257
More information about the libcxx-commits
mailing list