From af8f5b035416c72ed363266cd3560969c8da4d00 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 5 Jul 2025 03:22:13 -0700 Subject: [PATCH] mark P2788 as implemented and add test --- clang/test/SemaCXX/P2788.cpp | 17 +++++++++++++++++ clang/www/cxx_status.html | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 clang/test/SemaCXX/P2788.cpp 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 @@

C++20 implementation status

P2788R0 (DR) - No + Clang 17 Coroutines