[PATCH] D74615: [Analyzer] Add visitor to track iterator invalidation

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 14 07:46:34 PST 2020


baloghadamsoftware created this revision.
baloghadamsoftware added reviewers: NoQ, Szelethus.
baloghadamsoftware added a project: clang.
Herald added subscribers: steakhal, Charusso, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun.

To understand the bug report issued by the `InvalidatedIterator` checker it is essential to see the point where the iterator was invalidated and also to track the assignemnts of the already invalidated iterator up to its errorneous access. Since iterator invalidation is neither "done" by `InvalidatedIterator` checker nor by `IteratorModeling` but "happens" upon container modifications (modeled by `ContainerModeling`) the proper solution here seems to be a `BugReporterVisitor` instead of `NoteTag`s.


Repository:
  rC Clang

https://reviews.llvm.org/D74615

Files:
  clang/lib/StaticAnalyzer/Checkers/InvalidatedIteratorChecker.cpp
  clang/test/Analysis/invalidated-iterator.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74615.244665.patch
Type: text/x-patch
Size: 13227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200214/e8d1c814/attachment.bin>


More information about the cfe-commits mailing list