<p dir="ltr">On 26 Mar 2016 1:52 p.m., "Faisal Vali via cfe-commits" <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: faisalv<br>
> Date: Sat Mar 26 15:46:45 2016<br>
> New Revision: 264522<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=264522&view=rev">http://llvm.org/viewvc/llvm-project?rev=264522&view=rev</a><br>
> Log:<br>
> [NFC]</p>
<p dir="ltr">For future reference, a change to diagnostic wording does count as a functional change :)</p>
<p dir="ltr">> Tweak diagnostic for template template arguments, to include template aliases.<br>
><br>
> 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.<br>
><br>
><br>
> Modified:<br>
> cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
> cfe/trunk/lib/Sema/SemaTemplate.cpp<br>
><br>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=264522&r1=264521&r2=264522&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=264522&r1=264521&r2=264522&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)<br>
> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sat Mar 26 15:46:45 2016<br>
> @@ -3570,8 +3570,8 @@ def note_template_unnamed_type_here : No<br>
> "unnamed type used in template argument was declared here">;<br>
> def err_template_arg_overload_type : Error<<br>
> "template argument is the type of an unresolved overloaded function">;<br>
> -def err_template_arg_not_class_template : Error<<br>
> - "template argument does not refer to a class template or template "<br>
> +def err_template_arg_not_valid_template : Error<<br>
> + "template argument does not refer to a class or alias template, or template "<br>
> "template parameter">;<br>
> def note_template_arg_refers_here_func : Note<<br>
> "template argument refers to function template %0, here">;<br>
> @@ -5993,10 +5993,10 @@ let CategoryName = "Lambda Issue" in {<br>
> "cannot deduce type for lambda capture %0 from initializer list">;<br>
><br>
> // C++1z '*this' captures.<br>
> - def warn_cxx14_compat_star_this_lambda_capture : Warning<<br>
> - "by value capture of '*this' is incompatible with C++ standards before C++1z">,<br>
> - InGroup<CXXPre1zCompat>, DefaultIgnore;<br>
> - def ext_star_this_lambda_capture_cxx1z : ExtWarn<<br>
> + def warn_cxx14_compat_star_this_lambda_capture : Warning<<br>
> + "by value capture of '*this' is incompatible with C++ standards before C++1z">,<br>
> + InGroup<CXXPre1zCompat>, DefaultIgnore;<br>
> + def ext_star_this_lambda_capture_cxx1z : ExtWarn<<br>
> "capture of '*this' by copy is a C++1z extension">, InGroup<CXX1z>;<br>
> }<br>
><br>
><br>
> Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=264522&r1=264521&r2=264522&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=264522&r1=264521&r2=264522&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)<br>
> +++ cfe/trunk/lib/Sema/SemaTemplate.cpp Sat Mar 26 15:46:45 2016<br>
> @@ -800,7 +800,7 @@ Decl *Sema::ActOnTemplateTemplateParamet<br>
> // However, it isn't worth doing.<br>
> TemplateArgumentLoc DefaultArg = translateTemplateArgument(*this, Default);<br>
> if (DefaultArg.getArgument().getAsTemplate().isNull()) {<br>
> - Diag(DefaultArg.getLocation(), diag::err_template_arg_not_class_template)<br>
> + Diag(DefaultArg.getLocation(), diag::err_template_arg_not_valid_template)<br>
> << DefaultArg.getSourceRange();<br>
> return Param;<br>
> }<br>
> @@ -5352,7 +5352,7 @@ bool Sema::CheckTemplateArgument(Templat<br>
> !isa<TypeAliasTemplateDecl>(Template)) {<br>
> assert(isa<FunctionTemplateDecl>(Template) &&<br>
> "Only function templates are possible here");<br>
> - Diag(Arg.getLocation(), diag::err_template_arg_not_class_template);<br>
> + Diag(Arg.getLocation(), diag::err_template_arg_not_valid_template);<br>
> Diag(Template->getLocation(), diag::note_template_arg_refers_here_func)<br>
> << Template;<br>
> }<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</p>