[PATCH] D81718: [Analyzer][NFC] Add methods `getReturnObject()` and `getArgObject()` to `CallEvent`
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 16 09:54:12 PDT 2020
baloghadamsoftware added a comment.
In D81718#2095957 <https://reviews.llvm.org/D81718#2095957>, @NoQ wrote:
> If the checker does not know something, then neither does a method on `CallEvent`. I suggest you don't introduce methods on `CallEvent` the entire purpose of which is to support an incorrect solution in your checker.
What is the correct solution then? To put branches all over the code of the checkers? Surely not. The checker must first recognize the nature of the iterator parameters and return values for every call. This recognition and then the decision should be wrapped into a function. If not in `CallEvent` then in the iterator-related checker's common library. There is no point to repeat the same code all over the checkers.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81718/new/
https://reviews.llvm.org/D81718
More information about the cfe-commits
mailing list