[PATCH] D134898: [Clang] define __cpp_named_character_escapes

Roy Jacobson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 01:11:06 PDT 2022


royjacobson updated this revision to Diff 464174.
royjacobson added a comment.

Remove literal suffix in accordance with the rest of the test


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134898/new/

https://reviews.llvm.org/D134898

Files:
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/test/Lexer/cxx-features.cpp


Index: clang/test/Lexer/cxx-features.cpp
===================================================================
--- clang/test/Lexer/cxx-features.cpp
+++ clang/test/Lexer/cxx-features.cpp
@@ -51,7 +51,7 @@
 #error "wrong value for __cpp_static_call_operator"
 #endif
 
-#if check(named_character_escapes, 0, 0, 0, 0, 0, 0)
+#if check(named_character_escapes, 202207, 202207, 202207, 202207, 202207, 202207)
 #error "wrong value for __cpp_named_character_escapes"
 #endif
 
Index: clang/lib/Frontend/InitPreprocessor.cpp
===================================================================
--- clang/lib/Frontend/InitPreprocessor.cpp
+++ clang/lib/Frontend/InitPreprocessor.cpp
@@ -697,10 +697,11 @@
     Builder.defineMacro("__cpp_multidimensional_subscript", "202110L");
   }
 
-  // We provide this as an extension in earlier language modes, so we
-  // also define the macro.
+  // We provide those C++2b features as extensions in earlier language modes, so
+  // we also define their feature test macros.
   if (LangOpts.CPlusPlus11)
     Builder.defineMacro("__cpp_static_call_operator", "202207L");
+  Builder.defineMacro("__cpp_named_character_escapes", "202207L");
 
   if (LangOpts.Char8)
     Builder.defineMacro("__cpp_char8_t", "201811L");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134898.464174.patch
Type: text/x-patch
Size: 1248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220930/2d31f873/attachment.bin>


More information about the cfe-commits mailing list