[clang] 1830b87 - [NFC] [C++] [Modules] Mark P2115 as implemented and add test (#147489)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 8 03:36:57 PDT 2025
Author: Ashwin Kishin Banwari
Date: 2025-07-08T18:36:53+08:00
New Revision: 1830b870902e4632f91fa8b25e57bff6b09bd25e
URL: https://github.com/llvm/llvm-project/commit/1830b870902e4632f91fa8b25e57bff6b09bd25e
DIFF: https://github.com/llvm/llvm-project/commit/1830b870902e4632f91fa8b25e57bff6b09bd25e.diff
LOG: [NFC] [C++] [Modules] Mark P2115 as implemented and add test (#147489)
This is already implemented. Proposal:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2115r0.html
Added:
clang/test/SemaCXX/P2115.cpp
Modified:
clang/www/cxx_status.html
Removed:
################################################################################
diff --git a/clang/test/SemaCXX/P2115.cpp b/clang/test/SemaCXX/P2115.cpp
new file mode 100644
index 0000000000000..4389be992440b
--- /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() {}
diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html
index 56b6dd06a57f8..bb7144b827c3c 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>
More information about the cfe-commits
mailing list