If the a value has received its value through suspicious means, we suppress it. Tracked conditions are very much relevant to the occurrence of a bug, if their value is fishy, the entire bug report probably is as well.
Diff Detail
Event Timeline
Aha! We need some positive results tho, given that these are heuristics.
clang/test/Analysis/inlining/inline-defensive-checks.m | ||
---|---|---|
113 | 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. |
I'm too sure what the implications of such a change is, so I'll get some real-life results before even thinking of commiting.
clang-format: please reformat the code