diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-03 00:39:37 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-03 00:39:37 +0000 |
| commit | 69e9d84b1ad1c208a4c502d3def8e9234b161e65 (patch) | |
| tree | 39767cf9e35d35f7c579fe8a6edc5d8f8753b7f6 | |
| parent | b542602c5f351d66b0a4213f537fd6fb8dde8dcd (diff) | |
| download | bcm5719-llvm-69e9d84b1ad1c208a4c502d3def8e9234b161e65.tar.gz bcm5719-llvm-69e9d84b1ad1c208a4c502d3def8e9234b161e65.zip | |
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.)
llvm-svn: 373548
| -rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 1 | ||||
| -rw-r--r-- | clang/test/Lexer/cxx-features.cpp | 4 | ||||
| -rwxr-xr-x | clang/www/cxx_status.html | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 95d9f62c608..6a3c898d8c3 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/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/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp index cda6f888cbc..868ec24a1d9 100644 --- a/clang/test/Lexer/cxx-features.cpp +++ b/clang/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/clang/www/cxx_status.html b/clang/www/cxx_status.html index cebe2ed136d..041d6aa242c 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -1003,14 +1003,13 @@ as the draft C++2a standard evolves. </tr> <tr> <!-- from Cologne --> <td><a href="http://wg21.link/p1331r2">P1331R2</a></td> - <td rowspan="2" class="svn" align="center">SVN</td> + <td rowspan="3" class="svn" align="center">SVN</td> </tr> <tr> <td><a href="http://wg21.link/p1668r1">P1668R1</a></td> </tr> <tr> <td><a href="http://wg21.link/p0784r7">P0784R7</a></td> - <td class="partial" align="center">Partial</td> </tr> <tr> <td>Prohibit aggregates with user-declared constructors</td> |

