[PATCH] D62525: [Analyzer] Add new visitor to the iterator checkers
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 31 15:59:58 PDT 2019
NoQ added a comment.
In D62525#1607813 <https://reviews.llvm.org/D62525#1607813>, @Szelethus wrote:
> In D62525#1523026 <https://reviews.llvm.org/D62525#1523026>, @baloghadamsoftware wrote:
> > The problem is that the transition is added in the top level function but iterator position adjustments happen in the lower level ones. Data flow is one-way, top-down. For example, an insertion happens into a vector that invalidates all the iterators at and after the position where it is inserted. In this case `handleInsert()` calls a function that iterates all the active iterator positions and calls other one that invalidates the ones affected by the insertion. To propagate back the list of iterators invalidated would be too complex. Increments and decrements are even worse. Thus here the correct way seems to find the relevant transitions in a visitor instead of trying to figure out what note tags to add at each transition.
> Mhm, I personally find this reasoning sufficient.
Ok, so is it problematic to define a lambda that checks whether an interesting iterator is invalidated? Or is it difficult to return the note tag from many stack frames in order to finally squeeze it into the transition?
CHANGES SINCE LAST ACTION
More information about the cfe-commits