[libcxx-commits] [libcxx] [libc++][NFC] Mark LWG2859 as "Nothing To Do" (PR #236127)
Lucas Mellone via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 28 01:38:49 PDT 2026
https://github.com/lknknm updated https://github.com/llvm/llvm-project/pull/236127
>From 0f65a12fa4e7aac2dc1cefe969a244d7272aefc7 Mon Sep 17 00:00:00 2001
From: Lucas Mellone <github.snugness349 at passinbox.com>
Date: Mon, 26 Oct 2026 19:21:53 +0100
Subject: [PATCH 1/3] lwg2859 initial commit
---
libcxx/docs/Status/Cxx20Issues.csv | 2 +-
.../support.dynamic/ptr.launder/launder.pass.cpp | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/libcxx/docs/Status/Cxx20Issues.csv b/libcxx/docs/Status/Cxx20Issues.csv
index e4ff0f28b5d33c..d3156c9bd991cc 100644
--- a/libcxx/docs/Status/Cxx20Issues.csv
+++ b/libcxx/docs/Status/Cxx20Issues.csv
@@ -190,7 +190,7 @@
"`LWG3149 <https://wg21.link/LWG3149>`__","``DefaultConstructible``\ should require default initialization","2019-11 (Belfast)","|Complete|","13","`#103883 <https://github.com/llvm/llvm-project/issues/103883>`__",""
"","","","","","",""
"`LWG1203 <https://wg21.link/LWG1203>`__","More useful rvalue stream insertion","2020-02 (Prague)","|Complete|","12","`#103884 <https://github.com/llvm/llvm-project/issues/103884>`__",""
-"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","","","`#100269 <https://github.com/llvm/llvm-project/issues/100269>`__",""
+"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","|Complete|","6","`#100269 <https://github.com/llvm/llvm-project/issues/100269>`__",""
"`LWG3018 <https://wg21.link/LWG3018>`__","``shared_ptr``\ of function type","2020-02 (Prague)","|Nothing To Do|","","`#103885 <https://github.com/llvm/llvm-project/issues/103885>`__",""
"`LWG3050 <https://wg21.link/LWG3050>`__","Conversion specification problem in ``chrono::duration``\ constructor","2020-02 (Prague)","|Complete|","19","`#103887 <https://github.com/llvm/llvm-project/issues/103887>`__",""
"`LWG3141 <https://wg21.link/LWG3141>`__","``CopyConstructible``\ doesn't preserve source values","2020-02 (Prague)","|Nothing To Do|","","`#103889 <https://github.com/llvm/llvm-project/issues/103889>`__",""
diff --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
index 404cdbcb7c49dd..f129d13f546775 100644
--- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
@@ -19,6 +19,19 @@
constexpr int gi = 5;
constexpr float gf = 8.f;
+struct A { int x, y; };
+A a[100];
+
+// LWG2859. Visible case where the optimiser sees everything and must not drop the store
+// to a[3].
+int test_reach_visible() {
+ a[3].y = 1;
+ int* p = std::launder(&a[2].x);
+ A* q = reinterpret_cast<A*>(p) + 1;
+ q->y = 42;
+ return a[3].y;
+}
+
int main(int, char**) {
static_assert(std::launder(&gi) == &gi, "" );
static_assert(std::launder(&gf) == &gf, "" );
@@ -31,5 +44,7 @@ int main(int, char**) {
assert(std::launder(i) == i);
assert(std::launder(f) == f);
+ assert(test_reach_visible() == 42);
+
return 0;
}
>From 9d8cd6625ea75d64bd4758f7206e99350520bd6a Mon Sep 17 00:00:00 2001
From: Lucas Mellone <github.snugness349 at passinbox.com>
Date: Tue, 27 Oct 2026 14:31:55 +0100
Subject: [PATCH 2/3] switch to Nothing To Do
---
libcxx/docs/Status/Cxx20Issues.csv | 2 +-
.../support.dynamic/ptr.launder/launder.pass.cpp | 15 ---------------
2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/libcxx/docs/Status/Cxx20Issues.csv b/libcxx/docs/Status/Cxx20Issues.csv
index d3156c9bd991cc..687acf5d40cbf4 100644
--- a/libcxx/docs/Status/Cxx20Issues.csv
+++ b/libcxx/docs/Status/Cxx20Issues.csv
@@ -190,7 +190,7 @@
"`LWG3149 <https://wg21.link/LWG3149>`__","``DefaultConstructible``\ should require default initialization","2019-11 (Belfast)","|Complete|","13","`#103883 <https://github.com/llvm/llvm-project/issues/103883>`__",""
"","","","","","",""
"`LWG1203 <https://wg21.link/LWG1203>`__","More useful rvalue stream insertion","2020-02 (Prague)","|Complete|","12","`#103884 <https://github.com/llvm/llvm-project/issues/103884>`__",""
-"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","|Complete|","6","`#100269 <https://github.com/llvm/llvm-project/issues/100269>`__",""
+"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","|Nothing To Do|","6","`#100269 <https://github.com/llvm/llvm-project/issues/100269>`__",""
"`LWG3018 <https://wg21.link/LWG3018>`__","``shared_ptr``\ of function type","2020-02 (Prague)","|Nothing To Do|","","`#103885 <https://github.com/llvm/llvm-project/issues/103885>`__",""
"`LWG3050 <https://wg21.link/LWG3050>`__","Conversion specification problem in ``chrono::duration``\ constructor","2020-02 (Prague)","|Complete|","19","`#103887 <https://github.com/llvm/llvm-project/issues/103887>`__",""
"`LWG3141 <https://wg21.link/LWG3141>`__","``CopyConstructible``\ doesn't preserve source values","2020-02 (Prague)","|Nothing To Do|","","`#103889 <https://github.com/llvm/llvm-project/issues/103889>`__",""
diff --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
index f129d13f546775..404cdbcb7c49dd 100644
--- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
@@ -19,19 +19,6 @@
constexpr int gi = 5;
constexpr float gf = 8.f;
-struct A { int x, y; };
-A a[100];
-
-// LWG2859. Visible case where the optimiser sees everything and must not drop the store
-// to a[3].
-int test_reach_visible() {
- a[3].y = 1;
- int* p = std::launder(&a[2].x);
- A* q = reinterpret_cast<A*>(p) + 1;
- q->y = 42;
- return a[3].y;
-}
-
int main(int, char**) {
static_assert(std::launder(&gi) == &gi, "" );
static_assert(std::launder(&gf) == &gf, "" );
@@ -44,7 +31,5 @@ int main(int, char**) {
assert(std::launder(i) == i);
assert(std::launder(f) == f);
- assert(test_reach_visible() == 42);
-
return 0;
}
>From e8e2deb1267fa12918bb74ad30ac34754fbf8670 Mon Sep 17 00:00:00 2001
From: Lucas Mellone <github.snugness349 at passinbox.com>
Date: Wed, 28 Oct 2026 09:38:36 +0100
Subject: [PATCH 3/3] Update libcxx/docs/Status/Cxx20Issues.csv
Co-authored-by: A. Jiang <de34 at live.cn>
---
libcxx/docs/Status/Cxx20Issues.csv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/docs/Status/Cxx20Issues.csv b/libcxx/docs/Status/Cxx20Issues.csv
index 687acf5d40cbf4..998ef5fffa366d 100644
--- a/libcxx/docs/Status/Cxx20Issues.csv
+++ b/libcxx/docs/Status/Cxx20Issues.csv
@@ -190,7 +190,7 @@
"`LWG3149 <https://wg21.link/LWG3149>`__","``DefaultConstructible``\ should require default initialization","2019-11 (Belfast)","|Complete|","13","`#103883 <https://github.com/llvm/llvm-project/issues/103883>`__",""
"","","","","","",""
"`LWG1203 <https://wg21.link/LWG1203>`__","More useful rvalue stream insertion","2020-02 (Prague)","|Complete|","12","`#103884 <https://github.com/llvm/llvm-project/issues/103884>`__",""
-"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","|Nothing To Do|","6","`#100269 <https://github.com/llvm/llvm-project/issues/100269>`__",""
+"`LWG2859 <https://wg21.link/LWG2859>`__","Definition of *reachable* in [ptr.launder] misses pointer arithmetic from pointer-interconvertible object","2020-02 (Prague)","|Nothing To Do|","","`#100269 <https://github.com/llvm/llvm-project/issues/100269>`__",""
"`LWG3018 <https://wg21.link/LWG3018>`__","``shared_ptr``\ of function type","2020-02 (Prague)","|Nothing To Do|","","`#103885 <https://github.com/llvm/llvm-project/issues/103885>`__",""
"`LWG3050 <https://wg21.link/LWG3050>`__","Conversion specification problem in ``chrono::duration``\ constructor","2020-02 (Prague)","|Complete|","19","`#103887 <https://github.com/llvm/llvm-project/issues/103887>`__",""
"`LWG3141 <https://wg21.link/LWG3141>`__","``CopyConstructible``\ doesn't preserve source values","2020-02 (Prague)","|Nothing To Do|","","`#103889 <https://github.com/llvm/llvm-project/issues/103889>`__",""
More information about the libcxx-commits
mailing list