ExtWarn. We want variadic templates to be usable in libc++/libstdc++
headers even when we're in C++98/03 mode, since it's the only clean
way to implement TR1 <functional>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123852
91177308-0d34-0410-b5e6-
96231b3b80d8
def err_invalid_storage_class_in_func_decl : Error<
"invalid storage class specifier in function declarator">;
def err_expected_namespace_name : Error<"expected namespace name">;
-def err_variadic_templates : Error<
- "variadic templates are only allowed in C++0x">;
+def ext_variadic_templates : ExtWarn<
+ "variadic templates are a C++0x extension">;
// Sema && Lex
def ext_longlong : Extension<
"'template' keyword outside of a template">, InGroup<CXX0x>;
// C++0x Variadic Templates
-def err_variadic_templates_unsupported : Error<
- "variadic templates are not yet implemented">;
def err_template_param_pack_default_arg : Error<
"template parameter pack cannot have a default argument">;
def err_template_param_pack_must_be_last_template_parameter : Error<
EllipsisLoc = ConsumeToken();
if (!getLang().CPlusPlus0x)
- Diag(EllipsisLoc, diag::err_variadic_templates);
+ Diag(EllipsisLoc, diag::ext_variadic_templates);
}
// Grab the template parameter name (if given)
EllipsisLoc = ConsumeToken();
if (!getLang().CPlusPlus0x)
- Diag(EllipsisLoc, diag::err_variadic_templates);
+ Diag(EllipsisLoc, diag::ext_variadic_templates);
}
// Get the identifier, if given.
if (T->containsUnexpandedParameterPack())
T = Context.getPackExpansionType(T, llvm::Optional<unsigned>());
else if (!getLangOptions().CPlusPlus0x)
- Diag(D.getEllipsisLoc(), diag::err_variadic_templates);
+ Diag(D.getEllipsisLoc(), diag::ext_variadic_templates);
break;
case Declarator::FileContext: