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

Chandler Carruth chandlerc at google.com
Mon Oct 3 09:53:39 PDT 2011

On Mon, Oct 3, 2011 at 9:43 AM, Kaelyn Uhrain <rikka at google.com> wrote:

> 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.

What about (based on Eli's example): "member declaration does not match
because it %select{is|is not}N const qualified"

It seems good to have the message explicitly indicate in which direction the
error was made, and we can use select to avoid over complex emission code...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111003/61297cf1/attachment.html>

More information about the cfe-commits mailing list