Skip to content

Conversation

@kish1n
Copy link
Contributor

@kish1n kish1n commented Jul 8, 2025

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

kish1n commented Jul 8, 2025

@ChuanqiXu9

@llvmbot
Copy link
Member

llvmbot commented Jul 8, 2025

@llvm/pr-subscribers-clang

Author: Ashwin Kishin Banwari (kish1n)

Changes

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


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

2 Files Affected:

  • (added) clang/test/SemaCXX/P2115.cpp (+21)
  • (modified) clang/www/cxx_status.html (+1-1)
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 831f79f7cf17a..1920c8fc79396 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>

@ChuanqiXu9 ChuanqiXu9 merged commit 1830b87 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