This is an archive of the discontinued LLVM Phabricator instance.

[analyzer][RetainCount] Remove the CheckOSObject option
ClosedPublic

Authored by Szelethus on Apr 14 2020, 4:31 AM.

Details

Summary

As per http://lists.llvm.org/pipermail/cfe-dev/2019-August/063215.html, lets get rid of this option.

It presents 2 issues that have bugged me for years now:

  • OSObject is NOT a boolean option. It in fact has 3 states:
    • osx.OSObjectRetainCount is enabled but OSObject it set to false: RetainCount regards the option as disabled.
    • osx.OSObjectRetainCount is enabled and OSObject it set to true: RetainCount regards the option as enabled.
    • osx.OSObjectRetainCount is disabled: RetainCount regards the option as disabled.
  • The hack involves directly modifying AnalyzerOptions::ConfigTable, which shouldn't even be public in the first place.

This still isn't really ideal, because it would be better to preserve the option and remove the checker (we want visible checkers to be associated with diagnostics, and hidden options like this one to be associated with changing how the modeling is done), but backwards compatibility is an issue.

Diff Detail

Event Timeline

Szelethus created this revision.Apr 14 2020, 4:31 AM
gamesh411 accepted this revision.May 20 2020, 6:37 AM

I have no authority whatsoever, but if there is no breakage in buildbots, then it means explicitly providing CheckOSObject param is not really valid use-case. I vote for this cleanup.

This revision is now accepted and ready to land.May 20 2020, 6:37 AM
This revision was automatically updated to reflect the committed changes.