https://github.com/kish1n created 
https://github.com/llvm/llvm-project/pull/147489

This is already implemented. Proposal: 
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2115r0.html

>From 9d24a78f734e5398a1bfc977b77b3287a5f5203e Mon Sep 17 00:00:00 2001
From: Ashwin Banwari <ashwinkbanw...@gmail.com>
Date: Tue, 8 Jul 2025 02:06:35 -0700
Subject: [PATCH 1/2] mark P2115 as implemented and add test

---
 clang/test/SemaCXX/P2115.cpp | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 clang/test/SemaCXX/P2115.cpp

diff --git a/clang/test/SemaCXX/P2115.cpp b/clang/test/SemaCXX/P2115.cpp
new file mode 100644
index 00000000000000..4389be992440b4
--- /dev/null
+++ b/clang/test/SemaCXX/P2115.cpp
@@ -0,0 +1,21 @@
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+
+
+// RUN: %clang -std=c++20 -fmodule-header %t/A.h -o %t/A.pcm
+// RUN: %clang -std=c++20 -fmodule-header %t/B.h -o %t/B.pcm
+// RUN: %clang -std=c++20 -fsyntax-only -fmodule-file=%t/A.pcm 
-fmodule-file=%t/B.pcm %t/main.cpp
+
+//--- A.h
+// expected-no-diagnostics
+enum { A = 0 };
+
+//--- B.h
+// expected-no-diagnostics
+enum { B = 1 };
+
+//--- main.cpp
+// expected-no-diagnostics
+import "A.h";
+import "B.h";
+int main() {}

>From bd4c208d9bc1b4de4bd1dfdc18abafc25c581f59 Mon Sep 17 00:00:00 2001
From: Ashwin Banwari <ashwinkbanw...@gmail.com>
Date: Tue, 8 Jul 2025 02:09:43 -0700
Subject: [PATCH 2/2] add to cxx_status

---
 clang/www/cxx_status.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html
index 831f79f7cf17a0..1920c8fc79396b 100755
--- a/clang/www/cxx_status.html
+++ b/clang/www/cxx_status.html
@@ -935,7 +935,7 @@ <h2 id="cxx20">C++20 implementation status</h2>
       </tr>
       <tr>
         <td><a href="https://wg21.link/p2115r0";>P2115R0</a></td>
-        <td class="partial" align="center">Partial</td>
+        <td class="full" align="center">Yes</td>
       </tr>
       <tr>
         <td><a href="https://wg21.link/p1815r2";>P1815R2</a></td>

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

Reply via email to