Page MenuHomePhabricator

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

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

Details

Summary

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

Repository
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

test/Analysis/retaincountchecker-compoundregion.m
23

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.