Page MenuHomePhabricator

[analyzer] Fix crashes in RetainCountChecker when underlying region is not a var

Authored by george.karpenkov on Mar 12 2018, 6:31 PM.



For other regions, the error message contains a good indication of the problem, and there, in general, nothing helpful we can print.
Error pointer to the problematic expression seems enough.

Diff Detail

rC Clang

Event Timeline

dcoughlin accepted this revision.Mar 14 2018, 10:56 AM

Looks good. It is nice to see this fixed. There is one testing nit inline


Can you use // expected-warning-re{{Potential leak of an object$}} here? This will make sure that the diagnostic doesn't include any extra text after 'object'.

This revision is now accepted and ready to land.Mar 14 2018, 10:56 AM
This revision was automatically updated to reflect the committed changes.