[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 Oct 3 05:58:53 PDT 2019


baloghadamsoftware added a comment.

In D62525#1609334 <https://reviews.llvm.org/D62525#1609334>, @NoQ wrote:

> 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?


Both. The lambda can iterator through all the iterator positions, but how could it know which one was just invalidated? Or incremented, decremented, reached the first position or the past-the end position? We do not keep history. Returning note tags and passing them through all the functions called, combining them is a nightmare. It makes the code totally unreadable and I am not even sure how to do it correctly. Note tags are great, but here a conventional visitor fits better.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62525/new/

https://reviews.llvm.org/D62525





More information about the cfe-commits mailing list