r189083 - Reword a diagnostic to avoid a confusing implication that it might be talking

Richard Smith richard-llvm at metafoo.co.uk
Thu Aug 22 19:16:48 PDT 2013


Author: rsmith
Date: Thu Aug 22 21:16:48 2013
New Revision: 189083

URL: http://llvm.org/viewvc/llvm-project?rev=189083&view=rev
Log:
Reword a diagnostic to avoid a confusing implication that it might be talking
about a declaration within a return type.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/SemaCXX/cxx1y-deduced-return-type.cpp
    cfe/trunk/test/SemaCXX/nested-name-spec.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=189083&r1=189082&r2=189083&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Aug 22 21:16:48 2013
@@ -4342,7 +4342,8 @@ def err_member_decl_does_not_match_sugge
   "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<

Modified: cfe/trunk/test/SemaCXX/cxx1y-deduced-return-type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx1y-deduced-return-type.cpp?rev=189083&r1=189082&r2=189083&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx1y-deduced-return-type.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx1y-deduced-return-type.cpp Thu Aug 22 21:16:48 2013
@@ -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 {

Modified: cfe/trunk/test/SemaCXX/nested-name-spec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/nested-name-spec.cpp?rev=189083&r1=189082&r2=189083&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/nested-name-spec.cpp (original)
+++ cfe/trunk/test/SemaCXX/nested-name-spec.cpp Thu Aug 22 21:16:48 2013
@@ -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;





More information about the cfe-commits mailing list