[libcxx-commits] [libcxx] 1544d1f - [libc++] Undeprecate ATOMIC_FLAG_INIT (LWG3659)

Raul Tambre via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 11 22:00:47 PDT 2022


Author: Raul Tambre
Date: 2022-07-12T08:00:40+03:00
New Revision: 1544d1f9fdb115782202d72ad200c3f93b2c4f5a

URL: https://github.com/llvm/llvm-project/commit/1544d1f9fdb115782202d72ad200c3f93b2c4f5a
DIFF: https://github.com/llvm/llvm-project/commit/1544d1f9fdb115782202d72ad200c3f93b2c4f5a.diff

LOG: [libc++] Undeprecate ATOMIC_FLAG_INIT (LWG3659)

According to @aaron.ballman this was marked Tentatively Ready as of 2022-07-07.
D129362 implemented the C counterpart.

Reviewed By: ldionne, #libc, Mordante

Differential Revision: https://reviews.llvm.org/D129380

Added: 
    

Modified: 
    libcxx/docs/ReleaseNotes.rst
    libcxx/docs/Status/Cxx20.rst
    libcxx/docs/Status/Cxx20Papers.csv
    libcxx/docs/Status/Cxx2bIssues.csv
    libcxx/include/atomic
    libcxx/test/std/atomics/atomics.flag/init.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index b564017bf6728..bf232ad7b3800 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -48,6 +48,7 @@ Implemented Papers
 - P0154R1 (Hardware inference size)
 - P0618R0 (Deprecating <codecvt>)
 - P2418R2 (Add support for ``std::generator``-like types to ``std::format``)
+- LWG3659 (Consider ``ATOMIC_FLAG_INIT`` undeprecation)
 
 - Marked the following papers as "Complete" (note that some of those might have
   been implemented in a previous release but not marked as such):

diff  --git a/libcxx/docs/Status/Cxx20.rst b/libcxx/docs/Status/Cxx20.rst
index a4d9b03e10e0c..e1a3c70614b6c 100644
--- a/libcxx/docs/Status/Cxx20.rst
+++ b/libcxx/docs/Status/Cxx20.rst
@@ -46,7 +46,8 @@ Paper Status
       Not yet implemented LWG-issues will cause API and ABI breakage.
    .. [#note-P0966] P0966: It was previously erroneously marked as complete in version 8.0. See `bug 45368 <https://llvm.org/PR45368>`__.
    .. [#note-P0619] P0619: Only sections D.8, D.9, D.10 and D.13 are implemented. Sections D.4, D.7, D.11, D.12, and D.14 remain undone.
-   .. [#note-P0883] P0883: shared_ptr and floating-point changes weren't applied as they themselves aren't implemented yet.
+   .. [#note-P0883.1] P0883: shared_ptr and floating-point changes weren't applied as they themselves aren't implemented yet.
+   .. [#note-P0883.2] P0883: ``ATOMIC_FLAG_INIT`` was marked deprecated in version 14.0, but was undeprecated with the implementation of LWG3659 in version 15.0.
    .. [#note-P2231] P2231: Optional is complete. The changes to variant haven't been implemented yet.
 
 

diff  --git a/libcxx/docs/Status/Cxx20Papers.csv b/libcxx/docs/Status/Cxx20Papers.csv
index e44a75e3ffc8a..14129ad392f9a 100644
--- a/libcxx/docs/Status/Cxx20Papers.csv
+++ b/libcxx/docs/Status/Cxx20Papers.csv
@@ -133,7 +133,7 @@
 "`P1661R1 <https://wg21.link/P1661R1>`__","LWG","Remove dedicated precalculated hash lookup interface","Cologne","|Nothing To Do|",""
 "`P1754R1 <https://wg21.link/P1754R1>`__","LWG","Rename concepts to standard_case for C++20, while we still can","Cologne","|In Progress|",""
 "","","","","",""
-"`P0883R2 <https://wg21.link/P0883R2>`__","LWG","Fixing Atomic Initialization","Belfast","|Complete| [#note-P0883]_","14.0"
+"`P0883R2 <https://wg21.link/P0883R2>`__","LWG","Fixing Atomic Initialization","Belfast","|Complete| [#note-P0883.1]_ [#note-P0883.2]_","14.0"
 "`P1391R4 <https://wg21.link/P1391R4>`__","LWG","Range constructor for std::string_view","Belfast","|Complete|","14.0"
 "`P1394R4 <https://wg21.link/P1394R4>`__","LWG","Range constructor for std::span","Belfast","|Complete|","14.0"
 "`P1456R1 <https://wg21.link/P1456R1>`__","LWG","Move-only views","Belfast","|Complete|","15.0"

diff  --git a/libcxx/docs/Status/Cxx2bIssues.csv b/libcxx/docs/Status/Cxx2bIssues.csv
index e5128322aed97..af62c1f92f7f0 100644
--- a/libcxx/docs/Status/Cxx2bIssues.csv
+++ b/libcxx/docs/Status/Cxx2bIssues.csv
@@ -162,4 +162,5 @@
 "`3645 <https://wg21.link/LWG3645>`__","``resize_and_overwrite`` is overspecified to call its callback with lvalues","Not voted in","|Complete|","14.0",""
 "`3656 <https://wg21.link/LWG3656>`__","Inconsistent bit operations returning a count","Not voted in","|Complete|","15.0",""
 "`3631 <https://wg21.link/LWG3631>`__","``basic_format_arg(T&&)`` should use ``remove_cvref_t<T>`` throughout","Not voted in","|Complete|","15.0",""
+"`3659 <https://wg21.link/LWG3659>`__","Consider ``ATOMIC_FLAG_INIT`` undeprecation","Not voted in","|Complete|","15.0"
 "","","","",""

diff  --git a/libcxx/include/atomic b/libcxx/include/atomic
index df0179f2f26af..92da4820e928b 100644
--- a/libcxx/include/atomic
+++ b/libcxx/include/atomic
@@ -2696,7 +2696,6 @@ typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
 
 #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
 # if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1400
-#  pragma clang deprecated(ATOMIC_FLAG_INIT)
 #  pragma clang deprecated(ATOMIC_VAR_INIT)
 # endif
 #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)

diff  --git a/libcxx/test/std/atomics/atomics.flag/init.pass.cpp b/libcxx/test/std/atomics/atomics.flag/init.pass.cpp
index 07a7502d4cfd0..0905f468c9d7d 100644
--- a/libcxx/test/std/atomics/atomics.flag/init.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.flag/init.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // XFAIL: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 // <atomic>
 


        


More information about the libcxx-commits mailing list