[PATCH] D82385: [Analyzer] Fix errors in iterator modeling

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 23 08:31:31 PDT 2020


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

There is major a bug found in iterator modeling: upon adding a value to or subtracting a value from an iterator the position of the original iterator is also changed beside the result. This patch fixes this bug.

Another minor bug is that when printing the state, all the iterator positions are printed in a single line. This patch also fixes this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82385

Files:
  clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
  clang/test/Analysis/iterator-modeling.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82385.272691.patch
Type: text/x-patch
Size: 55718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200623/9b60619e/attachment-0001.bin>


More information about the cfe-commits mailing list