Skip to content

Commit 1830b87

Browse files
authored
[NFC] [C++] [Modules] Mark P2115 as implemented and add test (llvm#147489)
This is already implemented. Proposal: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2115r0.html
1 parent 4c7cfe3 commit 1830b87

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

clang/test/SemaCXX/P2115.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: rm -rf %t
2+
// RUN: split-file %s %t
3+
4+
5+
// RUN: %clang -std=c++20 -fmodule-header %t/A.h -o %t/A.pcm
6+
// RUN: %clang -std=c++20 -fmodule-header %t/B.h -o %t/B.pcm
7+
// RUN: %clang -std=c++20 -fsyntax-only -fmodule-file=%t/A.pcm -fmodule-file=%t/B.pcm %t/main.cpp
8+
9+
//--- A.h
10+
// expected-no-diagnostics
11+
enum { A = 0 };
12+
13+
//--- B.h
14+
// expected-no-diagnostics
15+
enum { B = 1 };
16+
17+
//--- main.cpp
18+
// expected-no-diagnostics
19+
import "A.h";
20+
import "B.h";
21+
int main() {}

clang/www/cxx_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ <h2 id="cxx20">C++20 implementation status</h2>
935935
</tr>
936936
<tr>
937937
<td><a href="https://wg21.link/p2115r0">P2115R0</a></td>
938-
<td class="partial" align="center">Partial</td>
938+
<td class="full" align="center">Yes</td>
939939
</tr>
940940
<tr>
941941
<td><a href="https://wg21.link/p1815r2">P1815R2</a></td>

0 commit comments

Comments
 (0)