royjacobson updated this revision to Diff 464007. royjacobson added a comment.
rebase 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, 202207L, 202207L, 202207L, 202207L, 202207L, 202207L) #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");
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, 202207L, 202207L, 202207L, 202207L, 202207L, 202207L) #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");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits