airglow923 created this revision.
airglow923 added a project: libc++.
airglow923 requested review of this revision.
Herald added a project: clang.
Herald added subscribers: libcxx-commits, cfe-commits.
Herald added a reviewer: libc++.

This revision is a patch for bug 50224 
<https://bugs.llvm.org/show_bug.cgi?id=50224>.

The current implementation of `std::forward_list::swap` uses 
`propagate_on_container_move_assignment` for `noexcept` specification. This 
revision has been made in an attempt to change it to 
`propagate_on_container_swap`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101899

Files:
  clang/lib/Format/Format.cpp
  libcxx/include/forward_list


Index: libcxx/include/forward_list
===================================================================
--- libcxx/include/forward_list
+++ libcxx/include/forward_list
@@ -534,7 +534,7 @@
 #if _LIBCPP_STD_VER >= 14
         _NOEXCEPT;
 #else
-        
_NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
+        _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<__node_allocator>::value);
 #endif
 protected:
@@ -599,7 +599,7 @@
 #if _LIBCPP_STD_VER >= 14
         _NOEXCEPT
 #else
-        
_NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
+        _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<__node_allocator>::value)
 #endif
 {
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ clang/lib/Format/Format.cpp
@@ -3054,7 +3054,7 @@
 
           LLVM_DEBUG(llvm::dbgs() << "Applying child configurations\n");
 
-          for (const auto& MemBuf : llvm::reverse(ChildFormatTextToApply)){
+          for (const auto &MemBuf : llvm::reverse(ChildFormatTextToApply)) {
             auto Ec = parseConfiguration(*MemBuf, &Style, AllowUnknownOptions,
                                          dropDiagnosticHandler);
             // It was already correctly parsed.


Index: libcxx/include/forward_list
===================================================================
--- libcxx/include/forward_list
+++ libcxx/include/forward_list
@@ -534,7 +534,7 @@
 #if _LIBCPP_STD_VER >= 14
         _NOEXCEPT;
 #else
-        _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
+        _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<__node_allocator>::value);
 #endif
 protected:
@@ -599,7 +599,7 @@
 #if _LIBCPP_STD_VER >= 14
         _NOEXCEPT
 #else
-        _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
+        _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<__node_allocator>::value)
 #endif
 {
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ clang/lib/Format/Format.cpp
@@ -3054,7 +3054,7 @@
 
           LLVM_DEBUG(llvm::dbgs() << "Applying child configurations\n");
 
-          for (const auto& MemBuf : llvm::reverse(ChildFormatTextToApply)){
+          for (const auto &MemBuf : llvm::reverse(ChildFormatTextToApply)) {
             auto Ec = parseConfiguration(*MemBuf, &Style, AllowUnknownOptions,
                                          dropDiagnosticHandler);
             // It was already correctly parsed.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to