[libcxx-commits] [libcxx] Removed duplicated _LIBCPP_HIDE_FROM_ABI in libcxx (PR #122323)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 9 09:40:50 PST 2025


https://github.com/2LoS created https://github.com/llvm/llvm-project/pull/122323

None

>From ff12d49f0633678633d9e239db7424c60e94cb5d Mon Sep 17 00:00:00 2001
From: LoS <aurumpuro at gmail.com>
Date: Thu, 9 Jan 2025 18:46:36 +0100
Subject: [PATCH] Removed duplicated _LIBCPP_HIDE_FROM_ABI in libcxx

---
 .../include/__cxx03/__functional/function.h   |  2 +-
 libcxx/include/__cxx03/future                 |  2 +-
 libcxx/include/__cxx03/regex                  |  4 +--
 libcxx/include/__functional/function.h        | 32 +++++++++----------
 libcxx/include/future                         |  2 +-
 libcxx/include/regex                          | 26 +++++++--------
 6 files changed, 32 insertions(+), 36 deletions(-)

diff --git a/libcxx/include/__cxx03/__functional/function.h b/libcxx/include/__cxx03/__functional/function.h
index 1d60391494da80..891652f1da25f6 100644
--- a/libcxx/include/__cxx03/__functional/function.h
+++ b/libcxx/include/__cxx03/__functional/function.h
@@ -853,7 +853,7 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
 
   // construct/copy/destroy:
   _LIBCPP_HIDE_FROM_ABI function() _NOEXCEPT {}
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDE_FROM_ABI function(nullptr_t) _NOEXCEPT {}
+  _LIBCPP_HIDE_FROM_ABI function(nullptr_t) _NOEXCEPT {}
   _LIBCPP_HIDE_FROM_ABI function(const function&);
   _LIBCPP_HIDE_FROM_ABI function(function&&) _NOEXCEPT;
   template <class _Fp, class = _EnableIfLValueCallable<_Fp>>
diff --git a/libcxx/include/__cxx03/future b/libcxx/include/__cxx03/future
index f92bc1266939ef..9f43b87e04f322 100644
--- a/libcxx/include/__cxx03/future
+++ b/libcxx/include/__cxx03/future
@@ -1472,7 +1472,7 @@ public:
 
   _LIBCPP_HIDE_FROM_ABI void swap(__packaged_task_function&) _NOEXCEPT;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes...) const;
+  _LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes...) const;
 };
 
 template <class _Rp, class... _ArgTypes>
diff --git a/libcxx/include/__cxx03/regex b/libcxx/include/__cxx03/regex
index c05c8768a89a19..ea9512cd56953e 100644
--- a/libcxx/include/__cxx03/regex
+++ b/libcxx/include/__cxx03/regex
@@ -5544,9 +5544,7 @@ public:
 
   _LIBCPP_HIDE_FROM_ABI bool operator==(const regex_token_iterator& __x) const;
 #if _LIBCPP_STD_VER >= 20
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDE_FROM_ABI bool operator==(default_sentinel_t) const {
-    return *this == regex_token_iterator();
-  }
+  _LIBCPP_HIDE_FROM_ABI bool operator==(default_sentinel_t) const { return *this == regex_token_iterator(); }
 #endif
 #if _LIBCPP_STD_VER < 20
   _LIBCPP_HIDE_FROM_ABI bool operator!=(const regex_token_iterator& __x) const { return !(*this == __x); }
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index b483e8ea8f8567..a23a895a70319b 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -518,13 +518,13 @@ struct __policy {
 
   _LIBCPP_HIDE_FROM_ABI static const __policy* __create_empty() {
     static constexpr __policy __policy = {
-        nullptr,
-        nullptr,
-        true,
+      nullptr,
+      nullptr,
+      true,
 #  if _LIBCPP_HAS_RTTI
-        &typeid(void)
+      &typeid(void)
 #  else
-        nullptr
+      nullptr
 #  endif
     };
     return &__policy;
@@ -545,13 +545,13 @@ struct __policy {
   template <typename _Fun>
   _LIBCPP_HIDE_FROM_ABI static const __policy* __choose_policy(/* is_small = */ false_type) {
     static constexpr __policy __policy = {
-        &__large_clone<_Fun>,
-        &__large_destroy<_Fun>,
-        false,
+      &__large_clone<_Fun>,
+      &__large_destroy<_Fun>,
+      false,
 #  if _LIBCPP_HAS_RTTI
-        &typeid(typename _Fun::_Target)
+      &typeid(typename _Fun::_Target)
 #  else
-        nullptr
+      nullptr
 #  endif
     };
     return &__policy;
@@ -560,13 +560,13 @@ struct __policy {
   template <typename _Fun>
   _LIBCPP_HIDE_FROM_ABI static const __policy* __choose_policy(/* is_small = */ true_type) {
     static constexpr __policy __policy = {
-        nullptr,
-        nullptr,
-        false,
+      nullptr,
+      nullptr,
+      false,
 #  if _LIBCPP_HAS_RTTI
-        &typeid(typename _Fun::_Target)
+      &typeid(typename _Fun::_Target)
 #  else
-        nullptr
+      nullptr
 #  endif
     };
     return &__policy;
@@ -854,7 +854,7 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
 
   // construct/copy/destroy:
   _LIBCPP_HIDE_FROM_ABI function() _NOEXCEPT {}
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDE_FROM_ABI function(nullptr_t) _NOEXCEPT {}
+  _LIBCPP_HIDE_FROM_ABI function(nullptr_t) _NOEXCEPT {}
   _LIBCPP_HIDE_FROM_ABI function(const function&);
   _LIBCPP_HIDE_FROM_ABI function(function&&) _NOEXCEPT;
   template <class _Fp, class = _EnableIfLValueCallable<_Fp>>
diff --git a/libcxx/include/future b/libcxx/include/future
index 95a51fa425e411..d777ed8d6016f3 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -1492,7 +1492,7 @@ public:
 
   _LIBCPP_HIDE_FROM_ABI void swap(__packaged_task_function&) _NOEXCEPT;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes...) const;
+  _LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes...) const;
 };
 
 template <class _Rp, class... _ArgTypes>
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 5cad0bc4b812d6..57fdadbdc1b2f7 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -842,20 +842,20 @@ namespace regex_constants {
 // syntax_option_type
 
 enum syntax_option_type {
-  icase    = 1 << 0,
-  nosubs   = 1 << 1,
-  optimize = 1 << 2,
-  collate  = 1 << 3,
+  icase      = 1 << 0,
+  nosubs     = 1 << 1,
+  optimize   = 1 << 2,
+  collate    = 1 << 3,
 #  ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
   ECMAScript = 1 << 9,
 #  else
   ECMAScript = 0,
 #  endif
-  basic    = 1 << 4,
-  extended = 1 << 5,
-  awk      = 1 << 6,
-  grep     = 1 << 7,
-  egrep    = 1 << 8,
+  basic      = 1 << 4,
+  extended   = 1 << 5,
+  awk        = 1 << 6,
+  grep       = 1 << 7,
+  egrep      = 1 << 8,
   // 1 << 9 may be used by ECMAScript
   multiline = 1 << 10
 };
@@ -5548,9 +5548,7 @@ public:
 
   _LIBCPP_HIDE_FROM_ABI bool operator==(const regex_token_iterator& __x) const;
 #  if _LIBCPP_STD_VER >= 20
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDE_FROM_ABI bool operator==(default_sentinel_t) const {
-    return *this == regex_token_iterator();
-  }
+  _LIBCPP_HIDE_FROM_ABI bool operator==(default_sentinel_t) const { return *this == regex_token_iterator(); }
 #  endif
 #  if _LIBCPP_STD_VER < 20
   _LIBCPP_HIDE_FROM_ABI bool operator!=(const regex_token_iterator& __x) const { return !(*this == __x); }
@@ -5811,8 +5809,8 @@ template <class _BidirT>
 using match_results _LIBCPP_AVAILABILITY_PMR =
     std::match_results<_BidirT, polymorphic_allocator<std::sub_match<_BidirT>>>;
 
-using cmatch _LIBCPP_AVAILABILITY_PMR = match_results<const char*>;
-using smatch _LIBCPP_AVAILABILITY_PMR = match_results<std::pmr::string::const_iterator>;
+using cmatch _LIBCPP_AVAILABILITY_PMR  = match_results<const char*>;
+using smatch _LIBCPP_AVAILABILITY_PMR  = match_results<std::pmr::string::const_iterator>;
 
 #    if _LIBCPP_HAS_WIDE_CHARACTERS
 using wcmatch _LIBCPP_AVAILABILITY_PMR = match_results<const wchar_t*>;



More information about the libcxx-commits mailing list