[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 5 23:31:49 PDT 2018

baloghadamsoftware marked an inline comment as not done.
baloghadamsoftware added inline comments.

Comment at: test/Analysis/invalidated-iterator.cpp:32
+  *i0; // expected-warning{{Invalidated iterator accessed}}
whisperity wrote:
> This might not be applicable here, but isn't there a test case for copy operations where the iterator isn't invalidated? Something of a positive test to be added here. My only idea is something with weird reference-to-pointer magic. Might not worth the hassle.
Accoring to the rules (on STL containers) if a container is overwritten using a copy assignment,  all its iterators become invalidated. So I cannot imagine a positive test case here.


More information about the cfe-commits mailing list