[clang] [NFC] [C++] [Modules] Mark P2788 as implemented and add test (PR #147138)
Ashwin Kishin Banwari via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 5 03:24:49 PDT 2025
https://github.com/kish1n created https://github.com/llvm/llvm-project/pull/147138
This is already implemented.
>From af8f5b035416c72ed363266cd3560969c8da4d00 Mon Sep 17 00:00:00 2001
From: Ashwin Banwari <ashwinkbanwari at gmail.com>
Date: Sat, 5 Jul 2025 03:22:13 -0700
Subject: [PATCH] mark P2788 as implemented and add test
---
clang/test/SemaCXX/P2788.cpp | 17 +++++++++++++++++
clang/www/cxx_status.html | 2 +-
2 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 clang/test/SemaCXX/P2788.cpp
diff --git a/clang/test/SemaCXX/P2788.cpp b/clang/test/SemaCXX/P2788.cpp
new file mode 100644
index 0000000000000..a9184e1521e8e
--- /dev/null
+++ b/clang/test/SemaCXX/P2788.cpp
@@ -0,0 +1,17 @@
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+
+
+// RUN: %clang_cc1 -std=c++20 -verify -emit-module-interface %t/B.cpp -o %t/B.pcm
+// RUN: %clang_cc1 -std=c++20 -verify -emit-module-interface %t/A.cpp -fmodule-file=A:B=%t/B.pcm -o %t/A.pcm
+
+//--- A.cpp
+// expected-no-diagnostics
+export module A;
+import :B;
+export int x = dimensions + 1;
+
+//--- B.cpp
+// expected-no-diagnostics
+export module A:B;
+const int dimensions=3;
diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html
index 831f79f7cf17a..c13d273c9f863 100755
--- a/clang/www/cxx_status.html
+++ b/clang/www/cxx_status.html
@@ -947,7 +947,7 @@ <h2 id="cxx20">C++20 implementation status</h2>
</tr>
<tr> <!-- from Issaquah 2023 -->
<td><a href="https://wg21.link/P2788R0">P2788R0</a> (<a href="#dr">DR</a>)</td>
- <td class="none" align="center">No</td>
+ <td class="full" align="center">Clang 17</td>
</tr>
<tr>
<td>Coroutines</td>
More information about the cfe-commits
mailing list