diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-08-23 02:16:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-08-23 02:16:48 +0000 |
commit | d136f60b07ebbb6fd8991433cb0285f6dacfed6f (patch) | |
tree | d19aa6199f190ee095a3d448e0e215abb9da1c36 | |
parent | a609fe157654b5e3f54d2f43c1df05db7029d726 (diff) | |
download | bcm5719-llvm-d136f60b07ebbb6fd8991433cb0285f6dacfed6f.tar.gz bcm5719-llvm-d136f60b07ebbb6fd8991433cb0285f6dacfed6f.zip |
Reword a diagnostic to avoid a confusing implication that it might be talking
about a declaration within a return type.
llvm-svn: 189083
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 3 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx1y-deduced-return-type.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/nested-name-spec.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index dd0c540cbb5..17cfce1b950 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -4342,7 +4342,8 @@ def err_member_decl_does_not_match_suggest : Error< "out-of-line %select{declaration|definition}2 of %0 " "does not match any declaration in %1; did you mean %3?">; def err_member_def_does_not_match_ret_type : Error< - "out-of-line definition of %q0 differs from the declaration in the return type">; + "return type of out-of-line definition of %q0 differs from " + "that in the declaration">; def err_nonstatic_member_out_of_line : Error< "non-static data member defined out-of-line">; def err_qualified_typedef_declarator : Error< diff --git a/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp b/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp index e2565e6ea43..26d776f375d 100644 --- a/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp +++ b/clang/test/SemaCXX/cxx1y-deduced-return-type.cpp @@ -255,7 +255,7 @@ namespace DefaultedMethods { auto operator=(const A&) = default; // expected-error {{must return 'DefaultedMethods::A &'}} A &operator=(A&&); // expected-note {{previous}} }; - auto A::operator=(A&&) = default; // expected-error {{differs from the declaration in the return type}} + auto A::operator=(A&&) = default; // expected-error {{return type of out-of-line definition of 'DefaultedMethods::A::operator=' differs from that in the declaration}} } namespace Constexpr { diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp index 572e4798244..855af93c238 100644 --- a/clang/test/SemaCXX/nested-name-spec.cpp +++ b/clang/test/SemaCXX/nested-name-spec.cpp @@ -261,7 +261,7 @@ namespace PR8159 { namespace rdar7980179 { class A { void f0(); }; // expected-note {{previous}} - int A::f0() {} // expected-error {{out-of-line definition of 'rdar7980179::A::f0' differs from the declaration in the return type}} + int A::f0() {} // expected-error {{return type of out-of-line definition of 'rdar7980179::A::f0' differs}} } namespace alias = A; |