<div dir="ltr">Hi Hans, this should go onto the Clang 5 branch. Thanks!</div><div class="gmail_extra"><br><div class="gmail_quote">On 10 August 2017 at 20:39, Richard Smith via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br>
Date: Thu Aug 10 20:39:40 2017<br>
New Revision: 310694<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=310694&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=310694&view=rev</a><br>
Log:<br>
Implement latest feature test macro recommendations, P0096R4.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Frontend/<wbr>InitPreprocessor.cpp<br>
    cfe/trunk/test/Lexer/cxx-<wbr>features.cpp<br>
    cfe/trunk/www/cxx_status.html<br>
<br>
Modified: cfe/trunk/lib/Frontend/<wbr>InitPreprocessor.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=310694&r1=310693&r2=310694&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/lib/<wbr>Frontend/InitPreprocessor.cpp?<wbr>rev=310694&r1=310693&r2=<wbr>310694&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Frontend/<wbr>InitPreprocessor.cpp (original)<br>
+++ cfe/trunk/lib/Frontend/<wbr>InitPreprocessor.cpp Thu Aug 10 20:39:40 2017<br>
@@ -498,6 +498,8 @@ static void InitializeCPlusPlusFeatureTe<br>
     Builder.defineMacro("__cpp_<wbr>ref_qualifiers", "200710");<br>
     Builder.defineMacro("__cpp_<wbr>alias_templates", "200704");<br>
   }<br>
+  if (LangOpts.ThreadsafeStatics)<br>
+    Builder.defineMacro("__cpp_<wbr>threadsafe_static_init", "200806");<br>
<br>
   // C++14 features.<br>
   if (LangOpts.CPlusPlus14) {<br>
@@ -520,6 +522,7 @@ static void InitializeCPlusPlusFeatureTe<br>
     Builder.defineMacro("__cpp_<wbr>noexcept_function_type", "201510");<br>
     Builder.defineMacro("__cpp_<wbr>capture_star_this", "201603");<br>
     Builder.defineMacro("__cpp_if_<wbr>constexpr", "201606");<br>
+    Builder.defineMacro("__cpp_<wbr>deduction_guides", "201611");<br>
     Builder.defineMacro("__cpp_<wbr>template_auto", "201606");<br>
     Builder.defineMacro("__cpp_<wbr>namespace_attributes", "201411");<br>
     Builder.defineMacro("__cpp_<wbr>enumerator_attributes", "201411");<br>
@@ -529,8 +532,6 @@ static void InitializeCPlusPlusFeatureTe<br>
     Builder.defineMacro("__cpp_<wbr>structured_bindings", "201606");<br>
     Builder.defineMacro("__cpp_<wbr>nontype_template_args", "201411");<br>
     Builder.defineMacro("__cpp_<wbr>fold_expressions", "201603");<br>
-    // FIXME: This is not yet listed in SD-6.<br>
-    Builder.defineMacro("__cpp_<wbr>deduction_guides", "201611");<br>
   }<br>
   if (LangOpts.AlignedAllocation)<br>
     Builder.defineMacro("__cpp_<wbr>aligned_new", "201606");<br>
<br>
Modified: cfe/trunk/test/Lexer/cxx-<wbr>features.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx-features.cpp?rev=310694&r1=310693&r2=310694&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/test/Lexer/<wbr>cxx-features.cpp?rev=310694&<wbr>r1=310693&r2=310694&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/Lexer/cxx-<wbr>features.cpp (original)<br>
+++ cfe/trunk/test/Lexer/cxx-<wbr>features.cpp Thu Aug 10 20:39:40 2017<br>
@@ -4,7 +4,7 @@<br>
 // RUN: %clang_cc1 -std=c++14 -fcxx-exceptions -fsized-deallocation -verify %s<br>
 // RUN: %clang_cc1 -std=c++1z -fcxx-exceptions -fsized-deallocation -verify %s<br>
 // RUN: %clang_cc1 -std=c++1z -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s<br>
-// RUN: %clang_cc1 -fno-rtti -verify %s -DNO_EXCEPTIONS -DNO_RTTI<br>
+// RUN: %clang_cc1 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS<br>
 // RUN: %clang_cc1 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify %s<br>
<br>
 // expected-no-diagnostics<br>
@@ -26,11 +26,11 @@<br>
 #error "wrong value for __cpp_hex_float"<br>
 #endif<br>
<br>
-#if check(inline_variables, 0, 0, 0, 201606) // FIXME: provisional name<br>
+#if check(inline_variables, 0, 0, 0, 201606)<br>
 #error "wrong value for __cpp_inline_variables"<br>
 #endif<br>
<br>
-#if check(aligned_new, 0, 0, 0, 201606) // FIXME: provisional name<br>
+#if check(aligned_new, 0, 0, 0, 201606)<br>
 #error "wrong value for __cpp_aligned_new"<br>
 #endif<br>
<br>
@@ -48,7 +48,7 @@<br>
<br>
 // constexpr checked below<br>
<br>
-#if check(if_constexpr, 0, 0, 0, 201606) // FIXME: provisional name<br>
+#if check(if_constexpr, 0, 0, 0, 201606)<br>
 #error "wrong value for __cpp_if_constexpr"<br>
 #endif<br>
<br>
@@ -56,11 +56,11 @@<br>
<br>
 // static_assert checked below<br>
<br>
-#if check(deduction_guides, 0, 0, 0, 201611) // FIXME: provisional name<br>
+#if check(deduction_guides, 0, 0, 0, 201611)<br>
 #error "wrong value for __cpp_deduction_guides"<br>
 #endif<br>
<br>
-#if check(template_auto, 0, 0, 0, 201606) // FIXME: provisional name<br>
+#if check(template_auto, 0, 0, 0, 201606)<br>
 #error "wrong value for __cpp_template_auto"<br>
 #endif<br>
<br>
@@ -80,7 +80,7 @@<br>
<br>
 // inheriting_constructors checked below<br>
<br>
-#if check(variadic_using, 0, 0, 0, 201611) // FIXME: provisional name<br>
+#if check(variadic_using, 0, 0, 0, 201611)<br>
 #error "wrong value for __cpp_variadic_using"<br>
 #endif<br>
<br>
@@ -163,6 +163,10 @@<br>
 #error "wrong value for __cpp_user_defined_literals"<br>
 #endif<br>
<br>
+#if defined(NO_THREADSAFE_STATICS) ? check(threadsafe_static_init, 0, 0, 0, 0) : check(threadsafe_static_init, 200806, 200806, 200806, 200806)<br>
+#error "wrong value for __cpp_threadsafe_static_init"<br>
+#endif<br>
+<br>
 #if check(lambdas, 0, 200907, 200907, 200907)<br>
 #error "wrong value for __cpp_lambdas"<br>
 #endif<br>
<br>
Modified: cfe/trunk/www/cxx_status.html<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=310694&r1=310693&r2=310694&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/www/cxx_<wbr>status.html?rev=310694&r1=<wbr>310693&r2=310694&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/www/cxx_status.html (original)<br>
+++ cfe/trunk/www/cxx_status.html Thu Aug 10 20:39:40 2017<br>
@@ -854,9 +854,9 @@ and library features that are not part o<br>
     <th>Available in Clang?</th><br>
  </tr><br>
     <tr><br>
-      <td rowspan="3">SD-6: SG10 feature test recommendations</td><br>
-      <td rowspan="3"><a href="<a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations" rel="noreferrer" target="_blank">http://isocpp.org/std/<wbr>standing-documents/sd-6-sg10-<wbr>feature-test-recommendations</a>"><wbr>SD-6</a></td><br>
-      <td rowspan="3">N/A</td><br>
+      <td rowspan="4">SD-6: SG10 feature test recommendations</td><br>
+      <td rowspan="4"><a href="<a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations" rel="noreferrer" target="_blank">http://isocpp.org/std/<wbr>standing-documents/sd-6-sg10-<wbr>feature-test-recommendations</a>"><wbr>SD-6</a></td><br>
+      <td rowspan="4">N/A</td><br>
       <td class="full" align="center"><br>
         Clang 3.4 (<a href="<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3745" rel="noreferrer" target="_blank">http://www.open-std.org/<wbr>jtc1/sc22/wg21/docs/papers/<wbr>2013/n3745</a>">N3745</a>)</br><br>
       </td><br>
@@ -871,6 +871,11 @@ and library features that are not part o<br>
         Clang 4 (<a href="<a href="http://wg21.link/p0096r3" rel="noreferrer" target="_blank">http://wg21.link/p0096r3</a><wbr>">P0096R3</a>)</a><br>
       </td><br>
     </tr><br>
+    <tr><br>
+      <td class="svn" align="center"><br>
+        Clang 5 (<a href="<a href="http://wg21.link/p0096r4" rel="noreferrer" target="_blank">http://wg21.link/p0096r4</a><wbr>">P0096R4</a>)</a><br>
+      </td><br>
+    </tr><br>
     <!-- FIXME: Implement latest recommendations.<br>
     <tr><br>
       <td class="svn" align="center"><br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>