From 7aa0d4aac3b43a193cc3428bef40ab328adaf7ac Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 12 May 2015 22:37:23 +0000 Subject: [PATCH] Have '__have_extension(cxx_variadic_templates)' return true for any C++ standard. llvm-svn: 237202 --- clang/lib/Lex/PPMacroExpansion.cpp | 1 + clang/test/Lexer/has_extension_cxx.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 87a07a4..7121578 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -1237,6 +1237,7 @@ static bool HasExtension(const Preprocessor &PP, const IdentifierInfo *II) { .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) diff --git a/clang/test/Lexer/has_extension_cxx.cpp b/clang/test/Lexer/has_extension_cxx.cpp index d3483df..d1267ea 100644 --- a/clang/test/Lexer/has_extension_cxx.cpp +++ b/clang/test/Lexer/has_extension_cxx.cpp @@ -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(); -- 2.7.4