FWIW, I don't understand what it means to "assign a value to itself".
(And if you want to make it something like "assignment does not change
the value of variable %0", 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