[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing
George Karpenkov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 17 11:30:43 PDT 2018
george.karpenkov requested changes to this revision.
george.karpenkov added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:715
void ento::registerUninitializedObjectChecker(CheckerManager &Mgr) {
auto Chk = Mgr.registerChecker<UninitializedObjectChecker>();
Chk->IsPedantic = Mgr.getAnalyzerOptions().getBooleanOption(
----------------
`registerChecker` now passes through all arguments to the constructor.
Could you pass the analyzer options to the constructor,
and populate the fields from there?
================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:720
"NotesAsWarnings", /*DefaultVal*/ false, Chk);
+ Chk->ShouldDereference = !Mgr.getAnalyzerOptions().getBooleanOption(
+ "NoDereference", /*DefaultVal*/ false, Chk);
----------------
Could we remove the negation in the option name? `CheckPointeeInitialization`? Also the value should be false by default if we want the checker to be evaluated on actual projects.
Repository:
rC Clang
https://reviews.llvm.org/D49438
More information about the cfe-commits
mailing list