Have '__have_extension(cxx_variadic_templates)' return true for any C++ standard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier 2015-05-12 22:37:23 +00:00
parent 59e556eb9d
commit 9e2794b1fe
2 changed files with 6 additions and 0 deletions

View File

@ -1237,6 +1237,7 @@ static bool HasExtension(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("cxx_range_for", LangOpts.CPlusPlus) .Case("cxx_range_for", LangOpts.CPlusPlus)
.Case("cxx_reference_qualified_functions", LangOpts.CPlusPlus) .Case("cxx_reference_qualified_functions", LangOpts.CPlusPlus)
.Case("cxx_rvalue_references", LangOpts.CPlusPlus) .Case("cxx_rvalue_references", LangOpts.CPlusPlus)
.Case("cxx_variadic_templates", LangOpts.CPlusPlus)
// C++1y features supported by other languages as extensions. // C++1y features supported by other languages as extensions.
.Case("cxx_binary_literals", true) .Case("cxx_binary_literals", true)
.Case("cxx_init_captures", LangOpts.CPlusPlus11) .Case("cxx_init_captures", LangOpts.CPlusPlus11)

View File

@ -41,6 +41,11 @@ int has_reference_qualified_functions();
int has_rvalue_references(); int has_rvalue_references();
#endif #endif
// CHECK: has_variadic_templates
#if __has_extension(cxx_variadic_templates)
int has_variadic_templates();
#endif
// CHECK: has_local_type_template_args // CHECK: has_local_type_template_args
#if __has_extension(cxx_local_type_template_args) #if __has_extension(cxx_local_type_template_args)
int has_local_type_template_args(); int has_local_type_template_args();