[PATCH] D55400: [analyzer] Move out tracking retain count for OSObjects into a separate checker

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 20 15:19:18 PST 2019


Szelethus added a comment.

I'm working on rebasing my dependency branches on top of trunk, and I'm somewhat stuck on this patch, could you lend a hand please?

So, I'm seeing in essence 3 checkers: the class `RetainCountChecker`, that does the modeling, and two checkers that are exposed to the users, `osx.cocoa.RetainCount` and `osx.OSObjectRetainCount`. While generally the solution would be to create a register checker called `RetainCountBase`, that is a common base of both of the already registered checkers, it raises a serious problem: all of the plist files that say "this error originates from checker `osx.cocoa.RetainCount`" will now instead refer to `osx.cocoa.RetainCountBase`. Unfortunately, I can't just make both checkers have the same name, as how would the user disable one and not the other?

There were other checkers that suffered from this, but those affected very few test files, and this one hits around 9, and I know that very serious work is being put into it from your part. I'd like to propose 3 solutions, and I'm very much open to new ones:

- Deal with the consequences of this, and just correct all plist files to now refer to the new base checker.
- Each time a report is emitted from these checkers, create a `ProgramPointTag`, and "manually" make sure the emitted checker name doesn't change.
- Rename `osx.cocoa.RetainCount` to something else. This one is clearly nonsensical, but let's put it here for the sake of completeness.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55400/new/

https://reviews.llvm.org/D55400





More information about the cfe-commits mailing list