On Jul 14, 2011, at 5:49 PM, Richard Trieu wrote:
>
> Unless I misunderstood the effect, it also eliminates some true positives as
> well, in code like
>
> if (dependent-thing && 0)
>
>
> This change will still catch such an example, since the value-dependent check
> is only on the right hand side. If you check the test cases, there is an
> example of such a thing. See the excerpt of the test below.
>
> +template<unsigned int A, unsigned int B> struct S
> ...
> + e2 = A && 7 // expected-warning {{use of logical && with constant
> operand; switch to bitwise & or remove constant}}
> ...
> + int y = B && 3; // expected-warning {{use of logical && with constant
> operand; switch to bitwise & or remove constant}}
Interesting, okay. Then the patch looks fine; thanks!
- Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits