]> granicus.if.org Git - clang/commitdiff
Rename feature test for lambda init-captures from cxx_generalized_capture to
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 24 Jul 2013 17:51:13 +0000 (17:51 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 24 Jul 2013 17:51:13 +0000 (17:51 +0000)
cxx_init_capture. "generalized" is neither descriptive nor future-proof. No
compatibility problems expected, since we've never advertised having this
feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187058 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LanguageExtensions.rst
lib/Lex/PPMacroExpansion.cpp

index 229158d369af72de8b5878932029959b1031d179..1917e2b73c2701d97ff6112ca05674b29be9bd62 100644 (file)
@@ -826,9 +826,9 @@ for default initializers in aggregate members is enabled.
 C++1y generalized lambda capture
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Use ``__has_feature(cxx_generalized_capture)`` or
-``__has_extension(cxx_generalized_capture`` to determine if support for
-generalized lambda captures is enabled
+Use ``__has_feature(cxx_init_capture)`` or
+``__has_extension(cxx_init_capture)`` to determine if support for
+lambda captures with explicit initializers is enabled
 (for instance, ``[n(0)] { return ++n; }``).
 Clang does not yet support this feature.
 
index 4367168fffe0c4481800c3433351f4d04c76e42b..2a932392f2cab8064a2e8e56e84dad5be318e42a 100644 (file)
@@ -973,14 +973,14 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
            .Case("cxx_user_literals", LangOpts.CPlusPlus11)
            .Case("cxx_variadic_templates", LangOpts.CPlusPlus11)
            // C++1y features
+           .Case("cxx_aggregate_nsdmi", LangOpts.CPlusPlus1y)
            .Case("cxx_binary_literals", LangOpts.CPlusPlus1y)
            .Case("cxx_contextual_conversions", LangOpts.CPlusPlus1y)
-           //.Case("cxx_generalized_capture", LangOpts.CPlusPlus1y)
            //.Case("cxx_generic_lambda", LangOpts.CPlusPlus1y)
+           //.Case("cxx_init_capture", LangOpts.CPlusPlus1y)
            .Case("cxx_relaxed_constexpr", LangOpts.CPlusPlus1y)
            .Case("cxx_return_type_deduction", LangOpts.CPlusPlus1y)
            //.Case("cxx_runtime_array", LangOpts.CPlusPlus1y)
-           .Case("cxx_aggregate_nsdmi", LangOpts.CPlusPlus1y)
            //.Case("cxx_variable_templates", LangOpts.CPlusPlus1y)
            // Type traits
            .Case("has_nothrow_assign", LangOpts.CPlusPlus)