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

None

>From ff12d49f0633678633d9e239db7424c60e94cb5d Mon Sep 17 00:00:00 2001
From: LoS <aurump...@gmail.com>
Date: Thu, 9 Jan 2025 18:46:36 +0100
Subject: [PATCH 1/3] 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*>;

>From b306b22182585f0f485dd2f36acc1f033bf16912 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionn...@gmail.com>
Date: Fri, 10 Jan 2025 11:40:56 -0500
Subject: [PATCH 2/3] Format

---
 libcxx/include/__functional/function.h | 30 +++++++++++++-------------
 libcxx/include/regex                   | 22 +++++++++----------
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/libcxx/include/__functional/function.h 
b/libcxx/include/__functional/function.h
index a23a895a70319b..2924f6cad65783 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;
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 57fdadbdc1b2f7..dcee77cfacc3d0 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
 };
@@ -5809,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*>;

>From 1b60d6244d052e31b3fb02953e7e339f3f8fb6c3 Mon Sep 17 00:00:00 2001
From: LoS <aurump...@gmail.com>
Date: Sat, 11 Jan 2025 20:13:57 +0100
Subject: [PATCH 3/3] Fixed test file extensions

---
 ...ride => warn-inconsistent-missing-destructor-override.cpp} | 0
 ...structor-override => warn-suggest-destructor-override.cpp} | 0
 .../{warn-suggest-override => warn-suggest-override.cpp}      | 4 ++--
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename clang/test/SemaCXX/{warn-inconsistent-missing-destructor-override => 
warn-inconsistent-missing-destructor-override.cpp} (100%)
 rename clang/test/SemaCXX/{warn-suggest-destructor-override => 
warn-suggest-destructor-override.cpp} (100%)
 rename clang/test/SemaCXX/{warn-suggest-override => warn-suggest-override.cpp} 
(72%)

diff --git a/clang/test/SemaCXX/warn-inconsistent-missing-destructor-override 
b/clang/test/SemaCXX/warn-inconsistent-missing-destructor-override.cpp
similarity index 100%
rename from clang/test/SemaCXX/warn-inconsistent-missing-destructor-override
rename to clang/test/SemaCXX/warn-inconsistent-missing-destructor-override.cpp
diff --git a/clang/test/SemaCXX/warn-suggest-destructor-override 
b/clang/test/SemaCXX/warn-suggest-destructor-override.cpp
similarity index 100%
rename from clang/test/SemaCXX/warn-suggest-destructor-override
rename to clang/test/SemaCXX/warn-suggest-destructor-override.cpp
diff --git a/clang/test/SemaCXX/warn-suggest-override 
b/clang/test/SemaCXX/warn-suggest-override.cpp
similarity index 72%
rename from clang/test/SemaCXX/warn-suggest-override
rename to clang/test/SemaCXX/warn-suggest-override.cpp
index e06c939ff001fc..4959cbc7a8a5bf 100644
--- a/clang/test/SemaCXX/warn-suggest-override
+++ b/clang/test/SemaCXX/warn-suggest-override.cpp
@@ -17,13 +17,13 @@ struct C {
 
 struct D : public C {
   void run();
-  // expected-warning@-1 {{'run()' overrides a member function but is not 
marked 'override'}}
+  // expected-warning@-1 {{'run' overrides a member function but is not marked 
'override'}}
   ~D();
 };
 
 struct E : public C {
   virtual void run();
-  // expected-warning@-1 {{'run()' overrides a member function but is not 
marked 'override'}}
+  // expected-warning@-1 {{'run' overrides a member function but is not marked 
'override'}}
   virtual ~E();
 };
 

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to