[NFC] Tweak diagnostic for template template arguments, to include template aliases.
The prior diagnostic (err_template_arg_not_class_template) would state that the template argument to a template template parameter can only be a class template, when it can also be a template alias. The newly renamed diagnostic (err_template_arg_not_valid_template) mentions template aliases. llvm-svn: 264522
This commit is contained in:
@@ -800,7 +800,7 @@ Decl *Sema::ActOnTemplateTemplateParameter(Scope* S,
|
||||
// However, it isn't worth doing.
|
||||
TemplateArgumentLoc DefaultArg = translateTemplateArgument(*this, Default);
|
||||
if (DefaultArg.getArgument().getAsTemplate().isNull()) {
|
||||
Diag(DefaultArg.getLocation(), diag::err_template_arg_not_class_template)
|
||||
Diag(DefaultArg.getLocation(), diag::err_template_arg_not_valid_template)
|
||||
<< DefaultArg.getSourceRange();
|
||||
return Param;
|
||||
}
|
||||
@@ -5352,7 +5352,7 @@ bool Sema::CheckTemplateArgument(TemplateTemplateParmDecl *Param,
|
||||
!isa<TypeAliasTemplateDecl>(Template)) {
|
||||
assert(isa<FunctionTemplateDecl>(Template) &&
|
||||
"Only function templates are possible here");
|
||||
Diag(Arg.getLocation(), diag::err_template_arg_not_class_template);
|
||||
Diag(Arg.getLocation(), diag::err_template_arg_not_valid_template);
|
||||
Diag(Template->getLocation(), diag::note_template_arg_refers_here_func)
|
||||
<< Template;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user