Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mark lambda init-captures as complete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191607 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
commit 44868f5b6a0980744de08e9fa45193b5a29ff990 1 parent 39edfeb
@zygoloid zygoloid authored
View
9 lib/Lex/PPMacroExpansion.cpp
@@ -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);
}
View
9 test/Lexer/has_extension_cxx.cpp
@@ -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
View
10 test/Lexer/has_feature_cxx0x.cpp
@@ -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
View
4 www/cxx_status.html
@@ -433,15 +433,17 @@ <h2 id="cxx14">C++1y implementation status</h2>
<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>
Please sign in to comment.
Something went wrong with that request. Please try again.