From 1830b870902e4632f91fa8b25e57bff6b09bd25e Mon Sep 17 00:00:00 2001
From: Ashwin Kishin Banwari
Date: Tue, 8 Jul 2025 03:36:53 -0700
Subject: [PATCH] [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
---
clang/test/SemaCXX/P2115.cpp | 21 +++++++++++++++++++++
clang/www/cxx_status.html | 2 +-
2 files changed, 22 insertions(+), 1 deletion(-)
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 000000000000..4389be992440
--- /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 56b6dd06a57f..bb7144b827c3 100755
--- a/clang/www/cxx_status.html
+++ b/clang/www/cxx_status.html
@@ -935,7 +935,7 @@ C++23, informally referred to as C++26.
P2115R0 |
- Partial |
+ Yes |
P1815R2 |