NoQ added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:696
void ento::registerUninitializedObjectChecker(CheckerManager &Mgr) {
auto Chk = Mgr.registerChecker<UninitializedObjectChecker>();
Chk->IsPedantic = Mgr.getAnalyzerOptions().getBooleanOption(
----------------
george.karpenkov wrote:
> registerChecker passes through arguments to the constructor. Could we use
> that instead of mutable fields?
Really? Yay. I never noticed that. I think currently all checkers that need
options use mutable fields for that purpose, and everybody thought it was
intended to work this way.
I'm not super worried about fields being mutable because all checker callbacks
are `const` (so you're still protected from mutating them in all of your code),
but that'd definitely make the code look better.
Repository:
rC Clang
https://reviews.llvm.org/D48285
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits