[PATCH] D53483: [analyzer] Restrict AnalyzerOptions' interface so that non-checker objects have to be registered

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 25 04:20:16 PDT 2018


Szelethus updated this revision to Diff 171060.
Szelethus edited the summary of this revision.
Szelethus added a comment.

This diff has numerous changed to the last, but it's all "cosmetic", the actual logic is untouched.

- Added documentation as @xazax.hun suggested
- Removed `getIntegerOption`, `getBooleanOption`, which I realized were redundant with `getOption`. Left `getStringOption` in, which is now a private function.
- `getOption`, used internally to initialize config fields, was renamed to `initOption` and it's function changed accordingly (is now `void`).
- Moved the generated getter functions inline.
- (woohoo!) Realize that checker options do not modify the state of `AnalyzerOptions`, make them const.


https://reviews.llvm.org/D53483

Files:
  include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
  lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
  lib/StaticAnalyzer/Checkers/CloneChecker.cpp
  lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
  lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
  lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
  lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
  lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
  lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
  lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
  lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
  unittests/StaticAnalyzer/AnalyzerOptionsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53483.171060.patch
Type: text/x-patch
Size: 33991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181025/2be4dbf0/attachment-0001.bin>


More information about the cfe-commits mailing list