[PATCH] D48285: [analyzer]{UninitializedObjectChecker] Added "NotesAsWarnings" flag
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 18 18:59:05 PDT 2018
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
More information about the cfe-commits
mailing list