[PATCH] D159018: [clang][modules] Add a c23 module feature
Ian Anderson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 29 11:11:38 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGadb68c979d84: [clang][modules] Add a c23 module feature (authored by iana).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159018/new/
https://reviews.llvm.org/D159018
Files:
clang/docs/Modules.rst
clang/docs/ReleaseNotes.rst
clang/lib/Basic/Module.cpp
clang/test/Modules/Inputs/DependsOnModule.framework/module.map
clang/test/Modules/requires.m
Index: clang/test/Modules/requires.m
===================================================================
--- clang/test/Modules/requires.m
+++ clang/test/Modules/requires.m
@@ -35,4 +35,6 @@
@import DependsOnModule.C11; // expected-note {{module imported here}}
// expected-error at DependsOnModule.framework/module.map:64 {{module 'DependsOnModule.C17' requires feature 'c17'}}
@import DependsOnModule.C17; // expected-note {{module imported here}}
+// expected-error at DependsOnModule.framework/module.map:67 {{module 'DependsOnModule.C23' requires feature 'c23'}}
+ at import DependsOnModule.C23; // expected-note {{module imported here}}
#endif
Index: clang/test/Modules/Inputs/DependsOnModule.framework/module.map
===================================================================
--- clang/test/Modules/Inputs/DependsOnModule.framework/module.map
+++ clang/test/Modules/Inputs/DependsOnModule.framework/module.map
@@ -64,4 +64,7 @@
explicit module C17 {
requires c17
}
+ explicit module C23 {
+ requires c23
+ }
}
Index: clang/lib/Basic/Module.cpp
===================================================================
--- clang/lib/Basic/Module.cpp
+++ clang/lib/Basic/Module.cpp
@@ -113,6 +113,7 @@
.Case("c99", LangOpts.C99)
.Case("c11", LangOpts.C11)
.Case("c17", LangOpts.C17)
+ .Case("c23", LangOpts.C23)
.Case("freestanding", LangOpts.Freestanding)
.Case("gnuinlineasm", LangOpts.GNUAsm)
.Case("objc", LangOpts.ObjC)
Index: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -107,6 +107,7 @@
and the ``__STDC_VERSION__`` macro now expands to ``202311L`` instead of its
previous placeholder value. Clang continues to accept ``-std=c2x`` and
``-std=gnu2x`` as aliases for C23 and GNU C23, respectively.
+- Clang now supports `requires c23` for module maps.
Non-comprehensive list of changes in this release
-------------------------------------------------
Index: clang/docs/Modules.rst
===================================================================
--- clang/docs/Modules.rst
+++ clang/docs/Modules.rst
@@ -588,6 +588,9 @@
c17
C17 support is available.
+c23
+ C23 support is available.
+
freestanding
A freestanding environment is available.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159018.554437.patch
Type: text/x-patch
Size: 2481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230829/928813f2/attachment-0001.bin>
More information about the cfe-commits
mailing list