[PATCH] D62525: [Analyzer] Add new visitor to the iterator checkers
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 07:59:26 PDT 2019
baloghadamsoftware marked an inline comment as done.
baloghadamsoftware added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:281-282
+
+ // `FoundChange` becomes true when we find the statement the results in the
+ // current state of the iterator.
+ // `FoundEmptyness` becomes true when we find the block edge assuming
----------------
NoQ wrote:
> I don't think we should stop here. I think it's worth it to highlight *all* increments and decrements of the interesting iterator, so that it was clear how come that it has the given value.
>
> Additionally, because iterators are copied around, it makes sense to "recursively" apply the visitor to the original object when the iterator is obtained as a copy (similarly to how `trackExpressionValue` works).
This can be done but an iterator can reach the past-the-end or the first position by changing the container's size as well, not only by incrementing or decrementing the iterator itself.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62525/new/
https://reviews.llvm.org/D62525
More information about the cfe-commits
mailing list