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

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 22 16:14:59 PST 2019


george.karpenkov added a comment.

> Hmmm, does this mess with options that bad? Could you please clarify?

`registerChecker` gets-or-creates a checker object. A checker name (used for getting the options) is set the first time it's created.
The checker which was created first "wins" and gets to name the resulting checker.
In practice it basically means that options and checkers reusing the same class do not work.
Do you have better ideas on how this could be arranged?

I think the current situation is a mess - ideally I would prefer to be able to access the options in the constructor, but we can't even do that,
since `registerChecker` sets the checker name and is called after the object has been constructed.
It seems that it would only make sense if the checker name is known at the time the checker is constructed: probably the function `registerXChecker` should get it as an argument.


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