r373548 - Mark P0784R7 as complete and start defining its feature-test macro.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 2 17:39:37 PDT 2019
Author: rsmith
Date: Wed Oct 2 17:39:37 2019
New Revision: 373548
URL: http://llvm.org/viewvc/llvm-project?rev=373548&view=rev
Log:
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.)
Modified:
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
cfe/trunk/test/Lexer/cxx-features.cpp
cfe/trunk/www/cxx_status.html
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=373548&r1=373547&r2=373548&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Wed Oct 2 17:39:37 2019
@@ -543,6 +543,7 @@ static void InitializeCPlusPlusFeatureTe
// 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)
Modified: cfe/trunk/test/Lexer/cxx-features.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx-features.cpp?rev=373548&r1=373547&r2=373548&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/cxx-features.cpp (original)
+++ cfe/trunk/test/Lexer/cxx-features.cpp Wed Oct 2 17:39:37 2019
@@ -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
Modified: cfe/trunk/www/cxx_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=373548&r1=373547&r2=373548&view=diff
==============================================================================
--- cfe/trunk/www/cxx_status.html (original)
+++ cfe/trunk/www/cxx_status.html Wed Oct 2 17:39:37 2019
@@ -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>
More information about the cfe-commits
mailing list