[PATCH] D88216: [Analyzer] Fix handling of pointer-based iterator increments and decrements
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 24 04:29:29 PDT 2020
baloghadamsoftware created this revision.
baloghadamsoftware added a reviewer: NoQ.
baloghadamsoftware added a project: clang.
Herald added subscribers: ASDenysPetrov, martong, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity.
Herald added a reviewer: Szelethus.
baloghadamsoftware requested review of this revision.
The handling of iterators implemented as pointers were incorrectly handled in the increment and decrement operations because these operations did not handle the lvalue of the iterator correctly. This patch fixes that issue and extends the test coverage for such kind of iterators by adding an option to the simulated `std::vector` to implement its iterator as a pointer.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88216
Files:
clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
clang/test/Analysis/Inputs/system-header-simulator-cxx.h
clang/test/Analysis/diagnostics/explicit-suppression.cpp
clang/test/Analysis/invalidated-iterator.cpp
clang/test/Analysis/iterator-modeling.cpp
clang/test/Analysis/iterator-range.cpp
clang/test/Analysis/mismatched-iterator.cpp
clang/test/Analysis/smart-ptr-text-output.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88216.294013.patch
Type: text/x-patch
Size: 40203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200924/5fdf0470/attachment-0001.bin>
More information about the cfe-commits
mailing list