Page MenuHomePhabricator

[Analyzer] Iterator Checker - Part 6: Mismatched iterator checker for constructors and comparisons
ClosedPublic

Authored by baloghadamsoftware on May 4 2017, 6:02 AM.

Details

Summary

Extension of the mismatched iterator checker for constructors taking range of first..last (first and last must be iterators of the same container) and also for comparisons of iterators of different containers (one does not compare iterators of different containers, since the set of iterators is partially ordered, there are no relations between iterators of different containers, except that they are always non-equal).

Diff Detail

Event Timeline

NoQ accepted this revision.Dec 14 2017, 4:00 PM

This looks clear to me.

lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
624–625

C.getSVal(CCE->getArg(0)) etc. Or, even better, use PreCall and CallEvent(?)

This revision is now accepted and ready to land.Dec 14 2017, 4:00 PM
baloghadamsoftware edited reviewers, added: dcoughlin; removed: zaks.anna.Jan 17 2018, 7:42 AM

Rebased to Part 5.

Checking of constructor parameters moved to PreCall check.

baloghadamsoftware marked an inline comment as done.Sep 3 2018, 10:23 AM
This revision was automatically updated to reflect the committed changes.