[cfe-commits] r135222 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/SemaCXX/expressions.cpp

Richard Trieu rtrieu at google.com
Thu Jul 14 17:49:21 PDT 2011


>
>
> 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}}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110714/d723079c/attachment.html>


More information about the cfe-commits mailing list