[PATCH] D84316: [analyzer][NFC] Split CStringChecker to modeling and reporting

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 04:41:14 PDT 2020


Szelethus added a comment.

In D84316#2171270 <https://reviews.llvm.org/D84316#2171270>, @NoQ wrote:

> Imagine something like re-using the state trait implementation between `MallocChecker` and `StreamChecker` because they both model "resources that can be deallocated twice or leaked" - regardless of the specific nature of these resources. These checkers can implement their own API modeling maps, escape rules, warning messages, maybe model additional aspects of their problems, but fundamentally they're solving the same problem: finding leaks and overreleases of resources. This problem should ideally be solved once. This is why i advocate for abstract, generalized, "half-baked" state trait boilerplate implementations that can be re-used across checkers.


Big +1! I think there is a lot of smart in MallocChecker, and its far less confusing now then it used to be. It'd be worth exploring the merger of those checkers, but we should probably reverse this discussion for another time.


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

https://reviews.llvm.org/D84316





More information about the cfe-commits mailing list