r237202 - Have '__have_extension(cxx_variadic_templates)' return true for any C++ standard.
Eric Fiselier
eric at efcs.ca
Tue May 12 15:37:24 PDT 2015
Author: ericwf
Date: Tue May 12 17:37:23 2015
New Revision: 237202
URL: http://llvm.org/viewvc/llvm-project?rev=237202&view=rev
Log:
Have '__have_extension(cxx_variadic_templates)' return true for any C++ standard.
Modified:
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
cfe/trunk/test/Lexer/has_extension_cxx.cpp
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=237202&r1=237201&r2=237202&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue May 12 17:37:23 2015
@@ -1237,6 +1237,7 @@ static bool HasExtension(const Preproces
.Case("cxx_range_for", LangOpts.CPlusPlus)
.Case("cxx_reference_qualified_functions", LangOpts.CPlusPlus)
.Case("cxx_rvalue_references", LangOpts.CPlusPlus)
+ .Case("cxx_variadic_templates", LangOpts.CPlusPlus)
// C++1y features supported by other languages as extensions.
.Case("cxx_binary_literals", true)
.Case("cxx_init_captures", LangOpts.CPlusPlus11)
Modified: cfe/trunk/test/Lexer/has_extension_cxx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/has_extension_cxx.cpp?rev=237202&r1=237201&r2=237202&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/has_extension_cxx.cpp (original)
+++ cfe/trunk/test/Lexer/has_extension_cxx.cpp Tue May 12 17:37:23 2015
@@ -41,6 +41,11 @@ int has_reference_qualified_functions();
int has_rvalue_references();
#endif
+// CHECK: has_variadic_templates
+#if __has_extension(cxx_variadic_templates)
+int has_variadic_templates();
+#endif
+
// CHECK: has_local_type_template_args
#if __has_extension(cxx_local_type_template_args)
int has_local_type_template_args();
More information about the cfe-commits
mailing list