3 ms·
They're using a terrible example, because I'd prefer that null reference to be caught whether the code is reachable or not.
by zogomoox 4y ago
They're using a terrible example, because I'd prefer that null reference to be caught whether the code is reachable or not.
- kccqzy 4y agoThat's in general not desirable. The conditions that lead to the dereference of the null pointer can be arbitrarily complicated, including coming from templated code or macro expansions. For all you know, the condition in that if statement could very well be the same condition to govern whether the pointer is null or not.
- MawKKe 4y ago> As far as static analyzers are concerned, one of the most important point to consider is filtering out false positives as much as possible, in order for the reports to be actionable.