[libcxx-commits] [libcxx] [libc++] Add the thread safety annotations unconditionally (PR #117497)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Nov 24 08:35:49 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 aaa0dd2f05ff957a171a87e78578dddc59fc49c2 e666b3cc327148b9c0757cfdeee0fc4569863b3e --extensions ,h -- libcxx/include/__config libcxx/include/__mutex/lock_guard.h libcxx/include/__mutex/mutex.h libcxx/include/mutex libcxx/include/shared_mutex
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex
index 513eebddc4..90ef593e41 100644
--- a/libcxx/include/shared_mutex
+++ b/libcxx/include/shared_mutex
@@ -200,9 +200,7 @@ public:
_LIBCPP_HIDE_FROM_ABI bool try_lock_shared() _LIBCPP_ACQUIRE_SHARED_CAPABILITY(true) {
return __base_.try_lock_shared();
}
- _LIBCPP_HIDE_FROM_ABI void unlock_shared() _LIBCPP_RELEASE_SHARED_CAPABILITY {
- return __base_.unlock_shared();
- }
+ _LIBCPP_HIDE_FROM_ABI void unlock_shared() _LIBCPP_RELEASE_SHARED_CAPABILITY { return __base_.unlock_shared(); }
// typedef __shared_mutex_base::native_handle_type native_handle_type;
// _LIBCPP_HIDE_FROM_ABI native_handle_type native_handle() { return __base::unlock_shared(); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/117497
More information about the libcxx-commits
mailing list