Szelethus marked an inline comment as done.
Szelethus added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:715
 void ento::registerUninitializedObjectChecker(CheckerManager &Mgr) {
   auto Chk = Mgr.registerChecker<UninitializedObjectChecker>();
   Chk->IsPedantic = Mgr.getAnalyzerOptions().getBooleanOption(
----------------
george.karpenkov wrote:
> `registerChecker` now passes through all arguments to the constructor.
> Could you pass the analyzer options to the constructor,
> and populate the fields from there?
From an earlier conversation (D48285#inline-423489):
>[...]`getBooleanOption(StringRef, /*DefaultVal*/ bool, const ento::CheckerBase 
>*)` depends on the constructed checker, so I don't think I can pull this off.
>
>There actually is a way to get boolean options without having to pass the 
>checker as an argument, but then it wouldn't be a checker specific option:
>`-analyzer-config Pedantic=true`
>instead of
>`-analyzer-config alpha.cplusplus.UninitializedObject:Pedantic=true`

I did see your patch D49050, but since `CHECKER::name` is assigned a value 
after the checker's construction, I don't think it solves this particular 
problem.


https://reviews.llvm.org/D49438



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

Reply via email to