<br><br><div class="gmail_quote">On Mon, Oct 3, 2011 at 9:43 AM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com">rikka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="gmail_quote"><div class="im">On Fri, Sep 30, 2011 at 4:39 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div></div><div>On Fri, Sep 30, 2011 at 4:12 PM,  <<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</a>> wrote:<br>
> Reviewers: chandlerc,<br>
><br>
><br>
><br>
> Please review this at <a href="http://codereview.appspot.com/5167048/" target="_blank">http://codereview.appspot.com/5167048/</a><br>
><br>
> Affected files:<br>
>  M include/clang/Basic/DiagnosticSemaKinds.td<br>
>  M lib/Sema/SemaDecl.cpp<br>
>  M test/SemaCXX/function-redecl.cpp<br>
>  M test/SemaCXX/nested-name-spec.cpp<br>
<br>
</div></div>I don't really like the wording "member declaration has const<br>
keyword"; there is no guarantee that the note points anywhere near the<br>
keyword "const", and you've lost the "nearly matches" part of the<br>
original diagnostic.  Maybe something more like "member declaration<br>
does not match because it is const qualified"?<br></blockquote><div><br></div></div>Yeah, I was having trouble coming up with wording that would work both when the declaration being diagnosed doesn't have a "const" but one of the matched decls does, and when the matched decl doesn't but the decl being diagnosed does. In particular I was trying to avoid having those two cases being two separate Diag statements under two branches of an if statement.</div>
</div></blockquote><div><br></div><div>Any particular reason you were trying to avoid that? I expect it'd probably make for better diagnostic text (as Eli was suggesting - though admittedly we haven't quite arrived at the ideal text yet) but I expect it'd also be nice to add fixits too & those would differ between the two cases (if we chose a consistent approach - eg: always assume the original declaration is correct so issue a fixit to fix the definition (by adding or removing const)).</div>
<div><br></div><div>- David </div></div>