NoQ added inline comments.
Herald added subscribers: a.sidorin, rnkovacs, szepet.


================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1584-1588
+  auto stateFound = state->BindExpr(CE, LCtx, RetVal);
+  auto stateNotFound = state->BindExpr(CE, LCtx, SecondParam);
+
+  C.addTransition(stateFound);
+  C.addTransition(stateNotFound);
----------------
We discussed this in D25660 but i couldn't find what we decided upon. It seems 
scary to me that in every situation, we declare that it is possible that the 
element is not in the container. It should be allowed, even if not necessarily 
efficient, to add the element to the container, and then use `std::find` to 
obtain an iterator to it. So i think that this state split, even if generally 
approved by your users, may need to stay under an analyzer checker option.


https://reviews.llvm.org/D32905



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to