r199292 - Fix cxx_variable_templates feature check and documentation
Alp Toker
alp at nuanti.com
Tue Jan 14 20:11:25 PST 2014
Author: alp
Date: Tue Jan 14 22:11:24 2014
New Revision: 199292
URL: http://llvm.org/viewvc/llvm-project?rev=199292&view=rev
Log:
Fix cxx_variable_templates feature check and documentation
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.
Modified:
cfe/trunk/docs/LanguageExtensions.rst
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
Modified: cfe/trunk/docs/LanguageExtensions.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LanguageExtensions.rst?rev=199292&r1=199291&r2=199292&view=diff
==============================================================================
--- cfe/trunk/docs/LanguageExtensions.rst (original)
+++ cfe/trunk/docs/LanguageExtensions.rst Tue Jan 14 22:11:24 2014
@@ -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
---
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=199292&r1=199291&r2=199292&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue Jan 14 22:11:24 2014
@@ -1039,7 +1039,7 @@ static bool HasExtension(const Preproces
// 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);
}
More information about the cfe-commits
mailing list