[analyzer] Model iterator random incrementation symmetrically
authorEndre Fülöp <endre.fulop@sigmatechnology.se>
Tue, 21 Jul 2020 07:31:42 +0000 (09:31 +0200)
committerEndre Fulop <gamesh411@gmail.com>
Tue, 4 Aug 2020 09:04:12 +0000 (11:04 +0200)
commit141cb8a1eecc0c843cdd4e788a28d2b6715e4dc5
tree5fd86f39933d686c7cd6d30c634214cfe18c4978
parentd9d22105792e08267583961a66ab6a53992fff89
[analyzer] Model iterator random incrementation symmetrically

Summary:
In case a pointer iterator is incremented in a binary plus expression
(operator+), where the iterator is on the RHS, IteratorModeling should
now detect, and track the resulting value.

Reviewers: Szelethus, baloghadamsoftware

Reviewed By: baloghadamsoftware

Subscribers: rnkovacs, whisperity, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, martong, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83190
clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
clang/test/Analysis/iterator-modeling.cpp