[Analyzer] IteratorRangeChecker verify `std::advance()`, `std::prev()` and `std::next()`
Upon calling one of the functions `std::advance()`, `std::prev()` and `std::next()` iterators could get out of their valid range which leads to undefined behavior. If all these funcions are inlined together with the functions they call internally (e.g. `__advance()` called by `std::advance()` in some implementations) the error is detected by `IteratorRangeChecker` but the bug location is inside the STL implementation. Even worse, if the budget runs out and one of the calls is not inlined the bug remains undetected. This patch fixes this behavior: all the bugs are detected at the point of the STL function invocation. Differential Revision: https://reviews.llvm.org/D76379
Loading
Please sign in to comment