diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-12-19 02:07:47 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-12-19 02:07:47 +0000 |
commit | 4dbf06c23f94160a2853466dada01e7b7eae7dad (patch) | |
tree | 7eb32f4a606096c990b7f224b33d0cd21c476afd /include/clang/Basic | |
parent | 0ef7967c69d45880fc3ca23ab8397a585814b4bb (diff) |
PR21969: Improve diagnostics for a conversion function that has any pieces of a
declared return type (including a trailing-return-type in C++14).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index a1b4b7dfa0..dadf3756d8 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -6451,7 +6451,13 @@ def err_conv_function_to_array : Error< def err_conv_function_to_function : Error< "conversion function cannot convert to a function type">; def err_conv_function_with_complex_decl : Error< - "must use a typedef to declare a conversion to %0">; + "cannot specify any part of a return type in the " + "declaration of a conversion function" + "%select{" + "; put the complete type after 'operator'|" + "; use a typedef to declare a conversion to %1|" + "; use an alias template to declare a conversion to %1|" + "}0">; def err_conv_function_redeclared : Error< "conversion function cannot be redeclared">; def warn_conv_to_self_not_used : Warning< |