-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed duplicated _LIBCPP_HIDE_FROM_ABI in libcxx #122323
Conversation
@llvm/pr-subscribers-libcxx Author: LoS (2LoS) ChangesFull diff: https://github.com/llvm/llvm-project/pull/122323.diff 6 Files Affected:
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*>;
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
I used clang-format to format code, but it seems checks for code formatting still fail. Am I missing anything? |
What version of clang-format are you using locally? We're using One thing you can do is apply the diff (provided in #122323 (comment)) to your patch. That's the diff that would make the CI job pass. Edit: For now, I pulled your patch and should have fixed the formatting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch, that's a good catch!
No description provided.