[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 7 05:24:37 PST 2018


Szelethus updated this revision to Diff 177182.
Szelethus retitled this revision from "[analyzer][WIP] Reimplement dependencies between checkers" to "[analyzer] Reimplement dependencies between checkers".
Szelethus edited the summary of this revision.
Szelethus added reviewers: MTC, baloghadamsoftware.
Szelethus added a comment.
This revision is now accepted and ready to land.

- No longer splitting up `InnerPointerChecker`
- After spending a lot of more time with the checker files, and adding various asserts in followup patches, realize that dependencies in between checkers are far, //far// more common than anticipated. I find it really cool that this is clearly visible now from the tblgen file. Add the following new checkers:
  - `StackAddrEscapeBase`
  - `StackAddrEscapeBase`
  - `CStringModeling`
  - `DynamicMemoryModeling` (base of the `MallocChecker` family)
  - `IteratorModeling` (base of the `IteratorChecker` family)
  - `ValistBase`
  - `SecuritySyntaxChecker` (base of `bcmp`, `bcopy`, etc...)
  - `NSOrCFErrorDerefChecker` (base of `NSErrorChecker` and  `CFErrorChecker`)
  - `IvarInvalidationModeling` (base of `IvarInvalidation` checker family)
- Make sure checkers are only enabled if all of their dependencies can be enabled
- Put strong emphasis on preserving the order of insertions when collecting enabled checkers
- It is no longer possible to enable `CallAndMessageUnInitRefArg` without `CallAndMessageChecker`. Disabling core checkers isn't supported anyways.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54438/new/

https://reviews.llvm.org/D54438

Files:
  include/clang/StaticAnalyzer/Checkers/CheckerBase.td
  include/clang/StaticAnalyzer/Checkers/Checkers.td
  include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h
  lib/StaticAnalyzer/Checkers/CStringChecker.cpp
  lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
  lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
  lib/StaticAnalyzer/Checkers/InterCheckerAPI.h
  lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
  lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
  lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
  lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
  lib/StaticAnalyzer/Checkers/ValistChecker.cpp
  lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp
  test/Analysis/NewDelete+MismatchedDeallocator_intersections.cpp
  test/Analysis/NewDelete-checker-test.cpp
  utils/TableGen/ClangSACheckersEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54438.177182.patch
Type: text/x-patch
Size: 47898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181207/a0981d53/attachment-0001.bin>


More information about the cfe-commits mailing list