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

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 16:54:38 PST 2019


NoQ added a comment.

Given that i roughly remember what the previous comment was about and i wanted to comment on this: you should totally move `evalCall` for any functions you need from `StdCLibraryFunctionsChecker` to this checker, given that your checker is more specialized.

That said, you shouldn't do that until your checker is out of alpha, because that'd disable modeling for users who don't mess with alpha checkers. Working around that would be a moderately interesting problem. Of course you can always disable `StdCLibraryFunctionsChecker` when testing your checker. We could also come up with an inter-checker API function that tells `StdCLibraryFunctionsChecker` to disable certain parts of itself and call this function upon `StreamChecker`'s registration. We could also go for a more principled solution by introducing a global `CallDescriptionMap<const Checker *>` that coordinates who `evalCall` what (instead of polling all checkers in a loop on every call and crashing whenever more than one checker responds).


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