[PATCH] D62525: [Analyzer] Add new visitor to the iterator checkers
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 28 07:12:14 PDT 2019
baloghadamsoftware created this revision.
baloghadamsoftware added reviewers: NoQ, Szelethus.
baloghadamsoftware added a project: clang.
Herald added subscribers: Charusso, gamesh411, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity.
Iterator bugs such as dereference of out-of-range or any access of invalidated iterators are difficult to understand. A `BugReporterVisitor` that marks the place where the iterator reached to past-the-end or the first position, became invalidated and marks the execution path with a message about the emptiness of the container helps much in understanding the actual bug. It also helps deciding whether the finding is a true or a false positive. This patch adds such a visitor to the iterator checkers.
Repository:
rC Clang
https://reviews.llvm.org/D62525
Files:
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
test/Analysis/Inputs/system-header-simulator-cxx.h
test/Analysis/diagnostics/explicit-suppression.cpp
test/Analysis/invalidated-iterator.cpp
test/Analysis/iterator-range.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62525.201660.patch
Type: text/x-patch
Size: 53833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190528/ca3f4d4c/attachment-0001.bin>
More information about the cfe-commits
mailing list