a.sidorin added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:44
@@ +43,3 @@
+
+    const BinaryOperator *B = dyn_cast<BinaryOperator>(Parent);
+    if (!B)
----------------
Note that InitExprs of DeclStmts are not binary operators. So you will not get 
a warning on initialization and this test:

```
void test(unsigned int p) {
  unsigned X = 1000;
  unsigned char uc = X; // expected-warning {{Loss of precision}}
}
```
will fail.


http://reviews.llvm.org/D13126



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to