On Thu, May 29, 2014 at 7:35 PM, Arthur O'Dwyer <[email protected]>
wrote:

> FWIW, I don't understand what it means to "assign a value to itself".
>

The actual message talks about "assigning value of variable to itself"
where the "itself" refers to the variable, not the value. I'm not really
worried about this, but I wouldn't object to a change either.


> (And if you want to make it something like "assignment does not change
> the value of variable %0"


This diagnostic text also looks fine to me.


> , notice that a^=a actually does change the
> value.)  Perhaps "lvalue %0 appears on both sides of (compound)
> assignment" would be more accurate.
>
> I assume this diagnostic is automatically suppressed in the case that
> we're really calling an overloaded operator|= or something, right?
>
>
> On Thu, May 29, 2014 at 4:25 PM, Richard Smith <[email protected]>
> wrote:
> > Maybe tweak the diagnostic (for both this case and the normal
> self-assignment case) to:
> >
> >   explicitly assigning value of variable of type %0 to itself
> >
> > (Adding the 'value of' makes this message work better for the
> compound-assignment case.)
> >
> > Other than that, LGTM
> >
> > http://reviews.llvm.org/D3753
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > [email protected]
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to