forked from OSchip/llvm-project
parent
75e3f695fb
commit
b438e62aba
|
@ -945,7 +945,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
|
|||
.Case("cxx_rvalue_references", LangOpts.CPlusPlus11)
|
||||
.Case("cxx_strong_enums", LangOpts.CPlusPlus11)
|
||||
.Case("cxx_static_assert", LangOpts.CPlusPlus11)
|
||||
.Case("cxx_thread_local",
|
||||
.Case("cxx_thread_local",
|
||||
LangOpts.CPlusPlus11 && PP.getTargetInfo().isTLSSupported())
|
||||
.Case("cxx_trailing_return", LangOpts.CPlusPlus11)
|
||||
.Case("cxx_unicode_literals", LangOpts.CPlusPlus11)
|
||||
|
@ -956,11 +956,11 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
|
|||
.Case("cxx_aggregate_nsdmi", LangOpts.CPlusPlus1y)
|
||||
.Case("cxx_binary_literals", LangOpts.CPlusPlus1y)
|
||||
.Case("cxx_contextual_conversions", LangOpts.CPlusPlus1y)
|
||||
//.Case("cxx_generic_lambda", LangOpts.CPlusPlus1y)
|
||||
//.Case("cxx_init_capture", LangOpts.CPlusPlus1y)
|
||||
//.Case("cxx_generic_lambdas", LangOpts.CPlusPlus1y)
|
||||
.Case("cxx_init_captures", LangOpts.CPlusPlus1y)
|
||||
.Case("cxx_relaxed_constexpr", LangOpts.CPlusPlus1y)
|
||||
.Case("cxx_return_type_deduction", LangOpts.CPlusPlus1y)
|
||||
//.Case("cxx_runtime_array", LangOpts.CPlusPlus1y)
|
||||
//.Case("cxx_runtime_arrays", LangOpts.CPlusPlus1y)
|
||||
.Case("cxx_variable_templates", LangOpts.CPlusPlus1y)
|
||||
// Type traits
|
||||
.Case("has_nothrow_assign", LangOpts.CPlusPlus)
|
||||
|
@ -1036,6 +1036,7 @@ static bool HasExtension(const Preprocessor &PP, const IdentifierInfo *II) {
|
|||
.Case("cxx_rvalue_references", LangOpts.CPlusPlus)
|
||||
// C++1y features supported by other languages as extensions.
|
||||
.Case("cxx_binary_literals", true)
|
||||
.Case("cxx_init_captures", LangOpts.CPlusPlus11)
|
||||
.Case("cxx_variable_templates", true)
|
||||
.Default(false);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// RUN: %clang_cc1 -E %s -o - | FileCheck %s
|
||||
// RUN: %clang_cc1 -std=c++98 -E %s -o - | FileCheck %s
|
||||
// RUN: %clang_cc1 -std=c++11 -E %s -o - | FileCheck %s --check-prefix=CHECK11
|
||||
|
||||
// CHECK: c_static_assert
|
||||
#if __has_extension(c_static_assert)
|
||||
|
@ -54,3 +55,9 @@ int has_binary_literals();
|
|||
#if __has_extension(cxx_variable_templates)
|
||||
int has_variable_templates();
|
||||
#endif
|
||||
|
||||
// CHECK-NOT: has_init_captures
|
||||
// CHECK11: has_init_captures
|
||||
#if __has_extension(cxx_init_captures)
|
||||
int has_init_captures();
|
||||
#endif
|
||||
|
|
|
@ -386,3 +386,13 @@ int no_variable_templates();
|
|||
// CHECK-1Y: has_variable_templates
|
||||
// CHECK-11: no_variable_templates
|
||||
// CHECK-NO-11: no_variable_templates
|
||||
|
||||
#if __has_feature(cxx_init_captures)
|
||||
int has_init_captures();
|
||||
#else
|
||||
int no_init_captures();
|
||||
#endif
|
||||
|
||||
// CHECK-1Y: has_init_captures
|
||||
// CHECK-11: no_init_captures
|
||||
// CHECK-NO-11: no_init_captures
|
||||
|
|
|
@ -433,15 +433,17 @@ available.</p>
|
|||
<td>Return type deduction for normal functions</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
</tr>
|
||||
<!-- Removed from C++1y.
|
||||
<tr>
|
||||
<td>Runtime-sized arrays with automatic storage duration</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html">N3639</a></td>
|
||||
<td class="partial" align="center">Partial</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<td>Initialized lambda captures</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3648.html">N3648</a></td>
|
||||
<td class="none" align="center">No</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Generic lambdas</td>
|
||||
|
|
Loading…
Reference in New Issue