diff options
author | Corentin Jabot <corentinjabot@gmail.com> | 2022-10-21 14:33:26 +0200 |
---|---|---|
committer | Corentin Jabot <corentinjabot@gmail.com> | 2022-10-24 18:10:43 +0200 |
commit | d0d2772379bd89f1dce3c456520272678cf4b966 (patch) | |
tree | 5d01e71d71edb584519ba28c867779be0e4b2204 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | cfb88ee3ba703ed0c469bb09dfe1cc9235579dfc (diff) | |
download | llvm-d0d2772379bd89f1dce3c456520272678cf4b966.zip llvm-d0d2772379bd89f1dce3c456520272678cf4b966.tar.gz llvm-d0d2772379bd89f1dce3c456520272678cf4b966.tar.bz2 |
[Clang] Implement P2513
Implement P2513
This change allows initializing an array of unsigned char,
or char from u8 string literals.
This was done both to support legacy code and for compatibility
with C where char8_t will be typedef to unsigned char.
This is backported to C++20 as per WG21 guidance.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D136449
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 2273fb1..96b93dc 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -705,7 +705,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, Builder.defineMacro("__cpp_named_character_escapes", "202207L"); if (LangOpts.Char8) - Builder.defineMacro("__cpp_char8_t", "201811L"); + Builder.defineMacro("__cpp_char8_t", "202207L"); Builder.defineMacro("__cpp_impl_destroying_delete", "201806L"); // TS features. |