[PATCH] D54438: [analyzer][WIP] Reimplement dependencies between checkers
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 6 16:23:18 PST 2018
NoQ added a comment.
In D54438#1315953 <https://reviews.llvm.org/D54438#1315953>, @Szelethus wrote:
> - ✔️ There are in fact a variety of checkers that contain subcheckers like `MallocChecker`, which I think is all good, but the concept that if a subchecker is enabled it only sort of registeres the main checker (in `MallocChecker`'s case it enables modeling, but not reporting) is very hard to follow. I propose that all such checkers should clearly have a base, called something `DynamicMemoryModeling`, or `IteratorModeling` etc.
This will be the most time-consuming part, as i imagine. You'll have to split each callback into two callbacks in two different checkers (`PostCall` vs. `PostStmt<CallExpr>` doesn't work!) and make sure that they are called in the correct order. I expect most modeling to go into `PostStmt` ("post-conditions") and most checking go to `PreStmt` ("pre-conditions"). I.e., "if the pre-condition of the statement is not fulfilled, the checker reports a bug. Otherwise, the model enforces the post-condition after the statement"). Some code (eg., on which particular statements does the checker react?) might be annoying to de-duplicate. Not sure how callbacks that don't have pre/post variants will behave.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54438/new/
https://reviews.llvm.org/D54438
More information about the cfe-commits
mailing list