[PATCH] D101899: std::forward_list::swap to use propagate_on_container_swap for noexcept specification

2021-06-22 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7adf713a5e22: [libc++] Change forward_list::swap to use 
propagate_on_container_swap for… (authored by airglow923, committed by ldionne).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101899/new/

https://reviews.llvm.org/D101899

Files:
  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: 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
 {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101899: std::forward_list::swap to use propagate_on_container_swap for noexcept specification

2021-06-22 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Thanks a lot for fixing this and sorry


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101899/new/

https://reviews.llvm.org/D101899

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


[PATCH] D101899: std::forward_list::swap to use propagate_on_container_swap for noexcept specification

2021-05-05 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added subscribers: ldionne, Quuxplusone.
Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.

This does actually look like a pretty straightforward typo in `forward_list`; 
the other containers all seem to get it right.
It's too bad that none of our tests notice the change; but, the 
POCCA/POCMA/POCS traits are obscure, and this affects literally nothing but 
`-std=c++11` mode. I don't think it makes sense to hold up this patch for lack 
of tests.
(@airglow923 please wait for an approval from "libc++" before landing. @ldionne 
ping! am I missing anything subtle here?)


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101899/new/

https://reviews.llvm.org/D101899

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


[PATCH] D101899: std::forward_list::swap to use propagate_on_container_swap for noexcept specification

2021-05-05 Thread Hyundeok Park via Phabricator via cfe-commits
airglow923 updated this revision to Diff 343011.

Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101899/new/

https://reviews.llvm.org/D101899

Files:
  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: 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
 {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D101899: std::forward_list::swap to use propagate_on_container_swap for noexcept specification

2021-05-05 Thread Hyundeok Park via Phabricator via cfe-commits
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 
.

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  : llvm::reverse(ChildFormatTextToApply)) {
 auto Ec = parseConfiguration(*MemBuf, , 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  : llvm::reverse(ChildFormatTextToApply)) {
 auto Ec = parseConfiguration(*MemBuf, , 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