[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 04:58:22 PDT 2020
baloghadamsoftware added a comment.
In D81718#2095043 <https://reviews.llvm.org/D81718#2095043>, @NoQ wrote:
> So it still thinks that the iterator is an object, whereas it should be tracking the iterator as symbol instead. As expected, because your code fails to discriminate between these two cases. You can't reorder checks in `{set,get}IteratorPosition` to fix that (first check for symbol, then check for region) because that'd break object iterators that reside in symbolic regions; you need to repeat the check on the AST instead. Which makes the reuse of that check proposed in this patch worthless.
This one is easy to overcome, because in case of pointers we need the pointer itself. The checker //knows// in advance, whether it is a pointer or not. However it //does not know// whether it is a value or a (constant) reference. However, with such iterator-specific behavior this function must go into the iterator library. (Pointers are symbols, references are objects.)
Do you have some alternative suggestions?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81718/new/
https://reviews.llvm.org/D81718
More information about the cfe-commits
mailing list