[cfe-commits] PATCH: Make DiagnoseInvalidRedeclaration state when a member decl does not match due to "const" mismatch (issue 5167048)

Kaelyn Uhrain rikka at google.com
Mon Oct 3 09:43:37 PDT 2011

On Fri, Sep 30, 2011 at 4:39 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Fri, Sep 30, 2011 at 4:12 PM,  <rikka at google.com> wrote:
> > Reviewers: chandlerc,
> >
> >
> >
> > Please review this at http://codereview.appspot.com/5167048/
> >
> > Affected files:
> >  M include/clang/Basic/DiagnosticSemaKinds.td
> >  M lib/Sema/SemaDecl.cpp
> >  M test/SemaCXX/function-redecl.cpp
> >  M test/SemaCXX/nested-name-spec.cpp
> I don't really like the wording "member declaration has const
> keyword"; there is no guarantee that the note points anywhere near the
> keyword "const", and you've lost the "nearly matches" part of the
> original diagnostic.  Maybe something more like "member declaration
> does not match because it is const qualified"?

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.


> The code looks fine.
> -Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111003/0bca8c2c/attachment.html>

More information about the cfe-commits mailing list