[llvm-branch-commits] [cfe-branch] r310722 - Merging r310694:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Aug 11 09:16:08 PDT 2017
Author: hans
Date: Fri Aug 11 09:16:08 2017
New Revision: 310722
URL: http://llvm.org/viewvc/llvm-project?rev=310722&view=rev
Log:
Merging r310694:
------------------------------------------------------------------------
r310694 | rsmith | 2017-08-10 20:39:40 -0700 (Thu, 10 Aug 2017) | 2 lines
Implement latest feature test macro recommendations, P0096R4.
------------------------------------------------------------------------
Modified:
cfe/branches/release_50/ (props changed)
cfe/branches/release_50/lib/Frontend/InitPreprocessor.cpp
cfe/branches/release_50/test/Lexer/cxx-features.cpp
cfe/branches/release_50/www/cxx_status.html
Propchange: cfe/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 11 09:16:08 2017
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310057,310158,310191,310359,310691-310692
+/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310057,310158,310191,310359,310691-310692,310694
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_50/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/Frontend/InitPreprocessor.cpp?rev=310722&r1=310721&r2=310722&view=diff
==============================================================================
--- cfe/branches/release_50/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/branches/release_50/lib/Frontend/InitPreprocessor.cpp Fri Aug 11 09:16:08 2017
@@ -497,6 +497,8 @@ static void InitializeCPlusPlusFeatureTe
Builder.defineMacro("__cpp_ref_qualifiers", "200710");
Builder.defineMacro("__cpp_alias_templates", "200704");
}
+ if (LangOpts.ThreadsafeStatics)
+ Builder.defineMacro("__cpp_threadsafe_static_init", "200806");
// C++14 features.
if (LangOpts.CPlusPlus14) {
@@ -519,6 +521,7 @@ static void InitializeCPlusPlusFeatureTe
Builder.defineMacro("__cpp_noexcept_function_type", "201510");
Builder.defineMacro("__cpp_capture_star_this", "201603");
Builder.defineMacro("__cpp_if_constexpr", "201606");
+ Builder.defineMacro("__cpp_deduction_guides", "201611");
Builder.defineMacro("__cpp_template_auto", "201606");
Builder.defineMacro("__cpp_namespace_attributes", "201411");
Builder.defineMacro("__cpp_enumerator_attributes", "201411");
@@ -528,8 +531,6 @@ static void InitializeCPlusPlusFeatureTe
Builder.defineMacro("__cpp_structured_bindings", "201606");
Builder.defineMacro("__cpp_nontype_template_args", "201411");
Builder.defineMacro("__cpp_fold_expressions", "201603");
- // FIXME: This is not yet listed in SD-6.
- Builder.defineMacro("__cpp_deduction_guides", "201611");
}
if (LangOpts.AlignedAllocation)
Builder.defineMacro("__cpp_aligned_new", "201606");
Modified: cfe/branches/release_50/test/Lexer/cxx-features.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/test/Lexer/cxx-features.cpp?rev=310722&r1=310721&r2=310722&view=diff
==============================================================================
--- cfe/branches/release_50/test/Lexer/cxx-features.cpp (original)
+++ cfe/branches/release_50/test/Lexer/cxx-features.cpp Fri Aug 11 09:16:08 2017
@@ -4,7 +4,7 @@
// RUN: %clang_cc1 -std=c++14 -fcxx-exceptions -fsized-deallocation -verify %s
// RUN: %clang_cc1 -std=c++1z -fcxx-exceptions -fsized-deallocation -verify %s
// RUN: %clang_cc1 -std=c++1z -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s
-// RUN: %clang_cc1 -fno-rtti -verify %s -DNO_EXCEPTIONS -DNO_RTTI
+// RUN: %clang_cc1 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS
// RUN: %clang_cc1 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify %s
// expected-no-diagnostics
@@ -26,11 +26,11 @@
#error "wrong value for __cpp_hex_float"
#endif
-#if check(inline_variables, 0, 0, 0, 201606) // FIXME: provisional name
+#if check(inline_variables, 0, 0, 0, 201606)
#error "wrong value for __cpp_inline_variables"
#endif
-#if check(aligned_new, 0, 0, 0, 201606) // FIXME: provisional name
+#if check(aligned_new, 0, 0, 0, 201606)
#error "wrong value for __cpp_aligned_new"
#endif
@@ -48,7 +48,7 @@
// constexpr checked below
-#if check(if_constexpr, 0, 0, 0, 201606) // FIXME: provisional name
+#if check(if_constexpr, 0, 0, 0, 201606)
#error "wrong value for __cpp_if_constexpr"
#endif
@@ -56,11 +56,11 @@
// static_assert checked below
-#if check(deduction_guides, 0, 0, 0, 201611) // FIXME: provisional name
+#if check(deduction_guides, 0, 0, 0, 201611)
#error "wrong value for __cpp_deduction_guides"
#endif
-#if check(template_auto, 0, 0, 0, 201606) // FIXME: provisional name
+#if check(template_auto, 0, 0, 0, 201606)
#error "wrong value for __cpp_template_auto"
#endif
@@ -80,7 +80,7 @@
// inheriting_constructors checked below
-#if check(variadic_using, 0, 0, 0, 201611) // FIXME: provisional name
+#if check(variadic_using, 0, 0, 0, 201611)
#error "wrong value for __cpp_variadic_using"
#endif
@@ -163,6 +163,10 @@
#error "wrong value for __cpp_user_defined_literals"
#endif
+#if defined(NO_THREADSAFE_STATICS) ? check(threadsafe_static_init, 0, 0, 0, 0) : check(threadsafe_static_init, 200806, 200806, 200806, 200806)
+#error "wrong value for __cpp_threadsafe_static_init"
+#endif
+
#if check(lambdas, 0, 200907, 200907, 200907)
#error "wrong value for __cpp_lambdas"
#endif
Modified: cfe/branches/release_50/www/cxx_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/www/cxx_status.html?rev=310722&r1=310721&r2=310722&view=diff
==============================================================================
--- cfe/branches/release_50/www/cxx_status.html (original)
+++ cfe/branches/release_50/www/cxx_status.html Fri Aug 11 09:16:08 2017
@@ -854,9 +854,9 @@ and library features that are not part o
<th>Available in Clang?</th>
</tr>
<tr>
- <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 rowspan="3">N/A</td>
+ <td rowspan="4">SD-6: SG10 feature test recommendations</td>
+ <td rowspan="4"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td>
+ <td rowspan="4">N/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>
@@ -871,6 +871,11 @@ and library features that are not part o
Clang 4 (<a href="http://wg21.link/p0096r3">P0096R3</a>)</a>
</td>
</tr>
+ <tr>
+ <td class="svn" align="center">
+ Clang 5 (<a href="http://wg21.link/p0096r4">P0096R4</a>)</a>
+ </td>
+ </tr>
<!-- FIXME: Implement latest recommendations.
<tr>
<td class="svn" align="center">
More information about the llvm-branch-commits
mailing list