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

llvm-svn: 237202
This commit is contained in:
Eric Fiselier 2015-05-12 22:37:23 +00:00
parent 2833966a3c
commit 7aa0d4aac3
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_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)

View File

@ -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();