[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 29 03:15:21 PDT 2024


https://github.com/NagyDonat commented:

LGTM overall, I added some minor inline remarks.

Also consider adding a few simple testcases to distinguish the effects of DivideZero and TaintedDiv. It would also be interesting to highlight what happens in situations like

```c
int test(void) {
  int x = getchar(); // or any other taint source
  if (!x)
    return 5 / x;
  return 8;
}
```
(I presume that in this case core.DivideZero will create a bug report, but the new TaintedDiv checker won't.)


https://github.com/llvm/llvm-project/pull/106389


More information about the cfe-commits mailing list