<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><br></div>Unless I misunderstood the effect, it also eliminates some true positives as well, in code like<div>
<br></div><div><span style="white-space:pre-wrap">    </span>if (dependent-thing && 0)</div></div></blockquote><div><br></div><div> </div></div>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.<div>
<span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><br></span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">+template<unsigned int A, unsigned int B> struct S</span></div>
<div>...</div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">+    e2 = A && 7      // expected-warning {{use of logical && with constant operand; switch to bitwise & or remove constant}}</span></div>
<div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">...</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">+    int y = B && 3;  // expected-warning {{use of logical && with constant operand; switch to bitwise & or remove constant}}</span></div>
<div><font class="Apple-style-span" color="#333333" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" color="#333333" face="arial, sans-serif"><br></font></div>