On Jan 19, 2011, at 7:53 AM, Hans Wennborg wrote:
> Hi,
>
> The attached patch adds a warning for using |= without parentheses in
> conditionals, as in:
>
> if (a |= b) {}
>
> and suggests replacing it with != or adding parentheses.
>
> This is for http://llvm.org/bugs/show_bug.cgi?id=9001
Looks great, thanks! I've committed it as r123836; please go ahead and close
the bug.
> Also, I considered whether it would make sense to warn for all
> assignment operators in conditionals, and not just common typos (i.e.
> = and |=). Do you think that would make sense?
Personally, I'd rather keep the warning to likely typos.
- Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits