[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

Balogh, Ádám via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 16 08:57:49 PDT 2016


baloghadamsoftware created this revision.
baloghadamsoftware added a reviewer: dcoughlin.
baloghadamsoftware added subscribers: cfe-commits, xazax.hun, o.gyorgy.
Herald added subscribers: modocache, mgorny, beanz.

This checker checks for iterators dereferenced when they are equal to the end() of their container. Return value of any end() method is tracked if its type has the same properties as a typical iterator (can be incremented, dereferenced, and its name ends with "iterator", "iter" or "it"). STL functions that search a value or range are evaluated by the checker as an optimization.


https://reviews.llvm.org/D25660

Files:
  include/clang/StaticAnalyzer/Checkers/Checkers.td
  lib/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp
  lib/StaticAnalyzer/Core/ExprEngine.cpp
  test/Analysis/iterator-past-end.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25660.74796.patch
Type: text/x-patch
Size: 37872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161016/c43e34f8/attachment-0001.bin>


More information about the cfe-commits mailing list