llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) <details> <summary>Changes</summary> The language of side seems fairly stable. Setting the feature test macro will ease implementation in standard libraries. --- Full diff: https://github.com/llvm/llvm-project/pull/142936.diff 3 Files Affected: - (modified) clang/lib/Frontend/InitPreprocessor.cpp (+1-1) - (modified) clang/test/Lexer/cxx-features.cpp (+4) - (modified) clang/www/cxx_status.html (+1-6) ``````````diff diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 69a91eef6aedb..ef1a508a96c35 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -773,7 +773,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, Builder.defineMacro("__cpp_pack_indexing", "202311L"); Builder.defineMacro("__cpp_deleted_function", "202403L"); Builder.defineMacro("__cpp_variadic_friend", "202403L"); - // Builder.defineMacro("__cpp_trivial_relocatability", "202502L"); + Builder.defineMacro("__cpp_trivial_relocatability", "202502L"); if (LangOpts.Char8) Builder.defineMacro("__cpp_char8_t", "202207L"); diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp index 8c1867d5c7365..ced5bcaf0db16 100644 --- a/clang/test/Lexer/cxx-features.cpp +++ b/clang/test/Lexer/cxx-features.cpp @@ -49,6 +49,10 @@ #error "wrong value for __cpp_placeholder_variables" #endif +#if check(trivial_relocatability, 202502, 202502, 202502, 202502, 202502, 202502, 202502) +#error "wrong value for __cpp_trivial_relocatability" +#endif + // --- C++23 features --- #if check(auto_cast, 0, 0, 0, 0, 0, 202110, 202110) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index dff57689e84b9..cbcf462970b7f 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -280,12 +280,7 @@ <h2 id="cxx26">C++2c implementation status</h2> <tr> <td>Trivial Relocatability</pre></td> <td><a href="https://wg21.link/P2786">P2786R13</a></td> - <td class="partial" align="center"> - <details> - <summary>Clang 21 (Partial)</summary> - The feature test macro (<code>__cpp_trivial_relocatability</code>) has not yet been set. - </details> - </td> + <td class="unreleased" align="center">Clang 21</td> </tr> <tr> <td><pre>#embed</pre></td> `````````` </details> https://github.com/llvm/llvm-project/pull/142936 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits