From 4efa77fde4f0d02eda74daea04cf4ef8ba7dae94 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 19 Dec 2012 03:15:32 +0000 Subject: [PATCH] Attempt to clarify a vexing-parse diagnostic. llvm-svn: 170492 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 +- clang/test/SemaTemplate/temp_arg_nontype.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 950fc4b..c49b875 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -2631,7 +2631,7 @@ def err_template_arg_must_be_type_suggest : Error< 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< diff --git a/clang/test/SemaTemplate/temp_arg_nontype.cpp b/clang/test/SemaTemplate/temp_arg_nontype.cpp index 747ddcc..31947d2 100644 --- a/clang/test/SemaTemplate/temp_arg_nontype.cpp +++ b/clang/test/SemaTemplate/temp_arg_nontype.cpp @@ -3,7 +3,7 @@ template struct A; // expected-note 5{{template parameter is declared her A<0> *a0; -A *a1; // expected-error{{template argument for non-type template parameter is treated as type 'int ()'}} +A *a1; // expected-error{{template argument for non-type template parameter is treated as function type 'int ()'}} A *a2; // expected-error{{template argument for non-type template parameter must be an expression}} -- 2.7.4