pfultz2 added a comment. > While I understand extending the analyzer to cover more is a good approach, > there is -Wconversion which seemingly covers this -- or at least the trivial > case(?):
Yes, but it won't catch something like this, which is more interesting: void g(unsigned); void f(int x) { if (x < 0) return; g(x - 1); } Repository: rC Clang https://reviews.llvm.org/D46081 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits