[PATCH] D69662: [Checkers] Avoid using evalCall in StreamChecker.

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 25 04:51:23 PST 2020


Szelethus added a comment.

In D69662#1890007 <https://reviews.llvm.org/D69662#1890007>, @NoQ wrote:

> In D69662#1889545 <https://reviews.llvm.org/D69662#1889545>, @Szelethus wrote:
>
> > Sorry for the slack :)
> >
> > One should never count on the invocation order of callback funcions in between checkers. In fact, I'm not too sure that my patches affect this, but I suspect that it does, as the container of choice for checker objects is `std::vector`.
>
>
> With checker dependencies introduced, i think it's not an unreasonable guarantee to make. Like, if you rely on your dependency to model things for you, you probably want to have your callbacks called after everything is set up by the dependency.
>
> That said, it's not always obvious what does "after" mean. I wouldn't be shocked if it turns out that the correct order is different in pre-stmt and post-stmt (i.e., dependent - dependency - actual event - dependency - dependent).


Well, you raise a valid point. While I do think that implementing complex checkers that have strong interaction should be left to the bit-more-experienced, maybe it'd be better to make the interface a bit more intuitive. I like to point at `IteratorChecker`, which is spread out across multiple files, despite it packing a lot of knowledge.

I'm afraid that I too have more questions then possible solution to this answer. My patches related to `MallocChecker` was (is) a research of some sort to come up with one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69662





More information about the cfe-commits mailing list