[libcxx-commits] [libcxx] [llvm] [clang] [clang-tools-extra] [libc++][hardening] Classify assertions related to leaks and syscalls. (PR #77164)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 19 17:30:38 PST 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 4f215fdd62d3f014750339eab9a46946b6fb1c4a c6fb1dea762178e7b850c5f13da9aaa28723eb21 -- libcxx/include/__config libcxx/include/__coroutine/coroutine_handle.h libcxx/include/__memory_resource/polymorphic_allocator.h libcxx/src/filesystem/operations.cpp libcxx/src/memory_resource.cpp libcxx/src/mutex.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp
index 8a99347fe1..2b75df5a4d 100644
--- a/libcxx/src/filesystem/operations.cpp
+++ b/libcxx/src/filesystem/operations.cpp
@@ -460,13 +460,13 @@ path __current_path(error_code* ec) {
typedef decltype(&::free) Deleter;
Deleter deleter = &::free;
#else
- errno = 0; // Note: POSIX mandates that modifying `errno` is thread-safe.
+ errno = 0; // Note: POSIX mandates that modifying `errno` is thread-safe.
auto size = ::pathconf(".", _PC_PATH_MAX);
if (size == -1) {
if (errno != 0) {
return err.report(capture_errno(), "call to pathconf failed");
- // `pathconf` returns `-1` without an error to indicate no limit.
+ // `pathconf` returns `-1` without an error to indicate no limit.
} else {
# if defined(__MVS__) && !defined(PATH_MAX)
size = _XOPEN_PATH_MAX + 1;
``````````
</details>
https://github.com/llvm/llvm-project/pull/77164
More information about the libcxx-commits
mailing list