This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] RetainCountChecker for OSObject model the "free" call
ClosedPublic

Authored by george.karpenkov on Nov 29 2018, 4:20 PM.

Details

Summary

The "free" call frees the object immediately, ignoring the reference count.
Sadly, it is actually used in a few places, so we need to model it.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ accepted this revision.Nov 29 2018, 4:29 PM
NoQ added inline comments.
clang/test/Analysis/osobject-retain-release.cpp
83 ↗(On Diff #175989)

I think it's good to specify that we expect a use-after-free warning and not a leak warning.

This revision is now accepted and ready to land.Nov 29 2018, 4:29 PM
This revision was automatically updated to reflect the committed changes.