NoQ added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:580
+  C.addTransition(stateFound);
+  C.addTransition(stateNotFound);
+}
----------------
Ouch, i have one more concern, which can be expressed with the following 
false-positive test which currently fails:

```
void foo() {
  std::vector<int> vec;
  vec.push_back(2016);
  auto i = vec.find(vec.begin(), vec.end(), 2016);
  *i; // no-warning
}
```

Not instantly sure what to do with this. You can avoid state splits until you 
are actually sure if both branches are possible, but that'd suppress a lot of 
useful positives. Such positives could be suppressed with assertions, of 
course, but i'd still hope there aren't too many of those.


https://reviews.llvm.org/D25660



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

Reply via email to