From: Richard Smith Date: Thu, 3 Oct 2019 00:39:37 +0000 (+0000) Subject: Mark P0784R7 as complete and start defining its feature-test macro. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d2412c7e23eb840c4020180ae4de0ac34a25611;p=clang Mark P0784R7 as complete and start defining its feature-test macro. Note that this only covers the language side of this feature. (The library side has its own feature test macro.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373548 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index 95d9f62c60..6a3c898d8c 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -543,6 +543,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, // C++20 features. if (LangOpts.CPlusPlus2a) { Builder.defineMacro("__cpp_conditional_explicit", "201806L"); + Builder.defineMacro("__cpp_constexpr_dynamic_alloc", "201907L"); Builder.defineMacro("__cpp_constinit", "201907L"); } if (LangOpts.Char8) diff --git a/test/Lexer/cxx-features.cpp b/test/Lexer/cxx-features.cpp index cda6f888cb..868ec24a1d 100644 --- a/test/Lexer/cxx-features.cpp +++ b/test/Lexer/cxx-features.cpp @@ -34,6 +34,10 @@ #error "wrong value for __cpp_char8_t" #endif +#if check(constexpr_dynamic_alloc, 0, 0, 0, 0, 201907) +#error "wrong value for __cpp_constexpr_dynamic_alloc" +#endif + #if check(constinit, 0, 0, 0, 0, 201907) #error "wrong value for __cpp_constinit" #endif diff --git a/www/cxx_status.html b/www/cxx_status.html index cebe2ed136..041d6aa242 100755 --- a/www/cxx_status.html +++ b/www/cxx_status.html @@ -1003,14 +1003,13 @@ as the draft C++2a standard evolves. P1331R2 - SVN + SVN P1668R1 P0784R7 - Partial Prohibit aggregates with user-declared constructors