Skip to content

[NFC] [C++] [Modules] Mark P2788 as implemented and add test #147138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

kish1n
Copy link
Contributor

@kish1n kish1n commented Jul 5, 2025

This is already implemented.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jul 5, 2025
@kish1n
Copy link
Contributor Author

kish1n commented Jul 5, 2025

@ChuanqiXu9

@llvmbot
Copy link
Member

llvmbot commented Jul 5, 2025

@llvm/pr-subscribers-clang

Author: Ashwin Kishin Banwari (kish1n)

Changes

This is already implemented.


Full diff: https://github.com/llvm/llvm-project/pull/147138.diff

2 Files Affected:

  • (added) clang/test/SemaCXX/P2788.cpp (+17)
  • (modified) clang/www/cxx_status.html (+1-1)
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>

@ChuanqiXu9 ChuanqiXu9 merged commit 48ff068 into llvm:main Jul 8, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants