[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 3 08:44:06 PDT 2018

baloghadamsoftware added a comment.

In https://reviews.llvm.org/D32859##inline-360206, @NoQ wrote:

> I do not immediately understand what is this useful for. At least tests don't look like they make use of these offset manipulations(?)
> Without full understanding, i wonder: when we overwrite one container with another, why don't we just overwrite all symbols associated with it, instead of creating a mixture of old and new symbols?
> Or maybe this is an accidental part of another patch, that has something to do with resizes?

I do not see which lines exactly you commented but I suppose it is about not reassigning all iterator positions to the new container upon moving. According to [[ C++ Reference | en.cppreference.com/w/cpp/container/vector/operator%3D ]] the past-end iterators are not moved to the new container.


More information about the cfe-commits mailing list