[libcxx-commits] [libcxx] [libc++] Enable modernize-use-equals-delete (PR #93293)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 24 03:35:20 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 8cc8e5d6c6ac9bfc888f3449f7e424678deae8c2 ef887111b07b825336f0261b8e76d16833a019bb -- libcxx/include/__functional/function.h libcxx/include/__functional/reference_wrapper.h libcxx/include/__locale_dir/locale_base_api/locale_guard.h libcxx/include/__mutex/lock_guard.h libcxx/include/__ranges/ref_view.h libcxx/include/__tree libcxx/include/forward_list libcxx/include/future libcxx/include/iosfwd libcxx/include/istream libcxx/include/list libcxx/include/locale libcxx/include/map libcxx/include/regex libcxx/include/unordered_map libcxx/include/vector
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 3ca8ce1136..3880c75066 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -234,7 +234,7 @@ class _LIBCPP_TEMPLATE_VIS __base;
 template <class _Rp, class... _ArgTypes>
 class __base<_Rp(_ArgTypes...)> {
 public:
-  __base(const __base&) = delete;
+  __base(const __base&)            = delete;
   __base& operator=(const __base&) = delete;
 
   _LIBCPP_HIDE_FROM_ABI __base() {}
diff --git a/libcxx/include/__locale_dir/locale_base_api/locale_guard.h b/libcxx/include/__locale_dir/locale_base_api/locale_guard.h
index 84095a35d3..2baacb51cd 100644
--- a/libcxx/include/__locale_dir/locale_base_api/locale_guard.h
+++ b/libcxx/include/__locale_dir/locale_base_api/locale_guard.h
@@ -30,7 +30,7 @@ struct __libcpp_locale_guard {
 
   locale_t __old_loc_;
 
-  __libcpp_locale_guard(__libcpp_locale_guard const&) = delete;
+  __libcpp_locale_guard(__libcpp_locale_guard const&)            = delete;
   __libcpp_locale_guard& operator=(__libcpp_locale_guard const&) = delete;
 };
 #elif defined(_LIBCPP_MSVCRT_LIKE)

``````````

</details>


https://github.com/llvm/llvm-project/pull/93293


More information about the libcxx-commits mailing list