[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 10 10:39:54 PDT 2011

One week and no additional comments... I'm going to submit this patch now,
incorporating the wording change suggested by Eli ("member declaration does
not match because it %select{is|is not}0 const qualified" instead of "member
declaration %select{has|lacks}0 const keyword").


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

> On Mon, Oct 3, 2011 at 9:53 AM, Chandler Carruth <chandlerc at google.com>wrote:
>> 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...
> Yup, already using a %select in the diagnostic to be able to explicitly
> indicate the direction of the mismatch. My comment wasn't directed at Eli's
> example but more a general comment that I trying to come up with a message
> for which I could use %select. If folks are fine with the wording Eli
> suggested then I'll use that and submit the patch. ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111010/61e31979/attachment.html>

More information about the cfe-commits mailing list