[PATCH] D62525: [Analyzer] Add new visitor to the iterator checkers

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 13:29:12 PDT 2019


Szelethus added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1099
     reportOutOfRangeBug("Iterator decremented ahead of its valid range.", LHS,
-                        C, N);
+                        C, N, Pos, false);
   }
----------------
`/*PastTheEnd=*/ false`


================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1277-1292
+            State = setContainerData(State, ContReg, CData->newEnd(OldEndSym));
           } else {
             State = setContainerData(State, ContReg,
-                                     ContainerData::fromEnd(NewEndSym));
+                                     ContainerData::fromEnd(OldEndSym));
           }
+          // Then generate and assign a new "end" symbol for the old container.
+          auto NewEndSym =
----------------
I'm confused, are these changes related to this patch? It doesn't seem to be.


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

https://reviews.llvm.org/D62525





More information about the cfe-commits mailing list