r282629 - Add a couple more tentative names for upcoming SD-6 feature checks. These might

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 13:42:56 PDT 2016


Author: rsmith
Date: Wed Sep 28 15:42:56 2016
New Revision: 282629

URL: http://llvm.org/viewvc/llvm-project?rev=282629&view=rev
Log:
Add a couple more tentative names for upcoming SD-6 feature checks. These might
not reflect the final chosen names, but supporting them now seems to have
little downside.

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=282629&r1=282628&r2=282629&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Wed Sep 28 15:42:56 2016
@@ -500,8 +500,12 @@ static void InitializeCPlusPlusFeatureTe
   // C++17 features.
   if (LangOpts.CPlusPlus1z) {
     Builder.defineMacro("__cpp_hex_float", "201603");
+    Builder.defineMacro("__cpp_inline_variables", "201606");
+    //Builder.defineMacro("__cpp_aligned_new", "201606");
     //Builder.defineMacro("__cpp_noexcept_function_type", "201510");
     Builder.defineMacro("__cpp_capture_star_this", "201603");
+    Builder.defineMacro("__cpp_if_constexpr", "201606");
+    //Builder.defineMacro("__cpp_template_auto", "201606");
     Builder.defineMacro("__cpp_namespace_attributes", "201411");
     Builder.defineMacro("__cpp_enumerator_attributes", "201411");
     Builder.defineMacro("__cpp_nested_namespace_definitions", "201411");

Modified: cfe/trunk/test/Lexer/cxx-features.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx-features.cpp?rev=282629&r1=282628&r2=282629&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/cxx-features.cpp (original)
+++ cfe/trunk/test/Lexer/cxx-features.cpp Wed Sep 28 15:42:56 2016
@@ -26,6 +26,15 @@
 #error "wrong value for __cpp_hex_float"
 #endif
 
+#if check(inline_variables, 0, 0, 0, 201606) // FIXME: provisional name
+#error "wrong value for __cpp_inline_variables"
+#endif
+
+#if check(aligned_new, 0, 0, 0, 0) // FIXME: provisional name
+// FIXME: value shuld be 201606 for cxx1z once implemented
+#error "wrong value for __cpp_aligned_new"
+#endif
+
 #if check(noexcept_function_type, 0, 0, 0, 0)
 // FIXME: value shuld be 201510 for cxx1z once implemented
 #error "wrong value for __cpp_noexcept_function_type"
@@ -41,10 +50,19 @@
 
 // FIXME: bump __cpp_constexpr to 201603 for constexpr lambda support
 
+#if check(if_constexpr, 0, 0, 0, 201606) // FIXME: provisional name
+#error "wrong value for __cpp_if_constexpr"
+#endif
+
 // range_based_for checked below
 
 // static_assert checked below
 
+#if check(template_auto, 0, 0, 0, 0) // FIXME: provisional name
+// FIXME: value shuld be 201606 for cxx1z once implemented
+#error "wrong value for __cpp_template_auto"
+#endif
+
 #if check(namespace_attributes, 0, 0, 0, 201411)
 // FIXME: allowed without warning in C++14 and C++11
 #error "wrong value for __cpp_namespace_attributes"
@@ -63,6 +81,9 @@
 #error "wrong value for __cpp_aggregate_bases"
 #endif
 
+// FIXME: structured_bindings / decomposition_decl name not yet settled, and
+// Clang implementation is incomplete.
+
 #if check(nontype_template_args, 0, 0, 0, 201411)
 #error "wrong value for __cpp_nontype_template_args"
 #endif

Modified: cfe/trunk/www/cxx_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=282629&r1=282628&r2=282629&view=diff
==============================================================================
--- cfe/trunk/www/cxx_status.html (original)
+++ cfe/trunk/www/cxx_status.html Wed Sep 28 15:42:56 2016
@@ -761,8 +761,8 @@ Clang version they became available:</p>
     <th>Available in Clang?</th>
  </tr>
     <tr>
-      <td rowspan="2">SD-6: SG10 feature test recommendations</td>
-      <td rowspan="2"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td>
+      <td rowspan="3">SD-6: SG10 feature test recommendations</td>
+      <td rowspan="3"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td>
       <td class="full" align="center">
         Clang 3.4 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3745">N3745</a>)</br>
       </td>




More information about the cfe-commits mailing list