[cfe-commits] r170492 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaTemplate/temp_arg_nontype.cpp

Richard Smith richard-llvm at metafoo.co.uk
Tue Dec 18 19:15:32 PST 2012


Author: rsmith
Date: Tue Dec 18 21:15:32 2012
New Revision: 170492

URL: http://llvm.org/viewvc/llvm-project?rev=170492&view=rev
Log:
Attempt to clarify a vexing-parse diagnostic.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=170492&r1=170491&r2=170492&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Dec 18 21:15:32 2012
@@ -2631,7 +2631,7 @@
 def err_template_arg_must_be_expr : Error<
   "template argument for non-type template parameter must be an expression">;
 def err_template_arg_nontype_ambig : Error<
-  "template argument for non-type template parameter is treated as type %0">;
+  "template argument for non-type template parameter is treated as function type %0">;
 def err_template_arg_must_be_template : Error<
   "template argument for template template parameter must be a class template%select{| or type alias template}0">;
 def ext_template_arg_local_type : ExtWarn<

Modified: cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp?rev=170492&r1=170491&r2=170492&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp (original)
+++ cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp Tue Dec 18 21:15:32 2012
@@ -3,7 +3,7 @@
 
 A<0> *a0;
 
-A<int()> *a1; // expected-error{{template argument for non-type template parameter is treated as type 'int ()'}}
+A<int()> *a1; // expected-error{{template argument for non-type template parameter is treated as function type 'int ()'}}
 
 A<int> *a2; // expected-error{{template argument for non-type template parameter must be an expression}}
 





More information about the cfe-commits mailing list