]> granicus.if.org Git - clang/commitdiff
Fix cxx_variable_templates feature check and documentation
authorAlp Toker <alp@nuanti.com>
Wed, 15 Jan 2014 04:11:24 +0000 (04:11 +0000)
committerAlp Toker <alp@nuanti.com>
Wed, 15 Jan 2014 04:11:24 +0000 (04:11 +0000)
This C++ feature has been marked complete since r191549, but the documentation
claimed it wasn't supported at all and the extension check misreported it as
being available in C.

No regression test; this was a short-lived typo.

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

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

index 682cc9843f76b8f54bb3abce53bad53c9c0958ea..24ef8550c93a88819df17117b852911035071c55 100644 (file)
@@ -873,7 +873,6 @@ C++1y variable templates
 Use ``__has_feature(cxx_variable_templates)`` or
 ``__has_extension(cxx_variable_templates)`` to determine if support for
 templated variable declarations is enabled.
-Clang does not yet support this feature.
 
 C11
 ---
index c6559b460beca51199e3c3a34c5b26b9fd55dc31..721760afa0ee7f92ea4392a7ff7dc81936f1d94d 100644 (file)
@@ -1039,7 +1039,7 @@ static bool HasExtension(const Preprocessor &PP, const IdentifierInfo *II) {
            // 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)
+           .Case("cxx_variable_templates", LangOpts.CPlusPlus)
            .Default(false);
 }