This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] RetainCountChecker: remove unused enum value; NFC.
ClosedPublic

Authored by NoQ on Dec 5 2016, 5:37 AM.

Details

Summary

OwnedSymbol is not used anywhere; OwnedAllocatedSymbol is used instead. I couldn't grasp the intended difference between the two, maybe we should remove it?

Diff Detail

Event Timeline

NoQ updated this revision to Diff 80257.Dec 5 2016, 5:37 AM
NoQ retitled this revision from to [analyzer] RetainCountChecker: remove unused enum value; NFC..
NoQ updated this object.
NoQ added reviewers: zaks.anna, dcoughlin.
NoQ added a subscriber: cfe-commits.
zaks.anna accepted this revision.Dec 5 2016, 9:03 AM
zaks.anna edited edge metadata.

I suspect allocated owned means that the analyzer saw the allocation site.

Removing dead code is great! Thanks. This looks good to me other than the name of the method that I commented about.

include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h
178–179

Should we rename into MakeAllocatedOwned()?

This revision is now accepted and ready to land.Dec 5 2016, 9:03 AM
dcoughlin added inline comments.Dec 5 2016, 9:29 AM
include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h
178–179

I think the current use of 'OwnedAllocatedSymbol' more closely matches what is conveyed by the name and documentation of 'OwnedSymbol', so it might be better to remove 'OwnedSymbol' (as Artem has done) and then immediately rename all occurrences of 'OwnedAllocatedSymbol' to 'OwnedSymbol'. There are plenty of places where the analyzer doesn't see the allocation site and yet yields 'OwnedAllocatedSymbol', so I don't think the current implementation matches its name.

NoQ updated this revision to Diff 80431.Dec 6 2016, 8:50 AM
NoQ edited edge metadata.

Remove OwnedAllocatedSymbol instead.

This revision was automatically updated to reflect the committed changes.