[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

Paul Fultz II via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 26 06:59:59 PDT 2018


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





More information about the cfe-commits mailing list