NoQ added a comment.
Aha! We need some positive results tho, given that these are heuristics.
================
Comment at: clang/test/Analysis/inlining/inline-defensive-checks.m:113
if (!mem)
- return 5/zero; // expected-warning {{Division by zero}}
+ return 5/zero;
return 0;
----------------
This code definitely deserves a warning tho. Regardless of any path-sensitive
reasoning, it's trivial to prove that either this line has a division by zero
or it's outright dead code. I'd leave a FIXME here. This shouldn't be
suppressed.
More importantly, we should have more tests to demonstrate how this patch is
useful. I.e., some code snippets in which it's obvious that the suppressed
warning is a false positive.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75697/new/
https://reviews.llvm.org/D75697
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits