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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to