[PATCH] D55458: [analyzer] ObjCContainers: Track index values.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 7 13:46:13 PST 2018
NoQ created this revision.
NoQ added reviewers: dcoughlin, george.karpenkov.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, arphaman, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
This is a checker for CF (well, not really ObjC) arrays that checks array bounds. As such, it's a good place to experiment with array bound checking.
Use `trackExpressionValue()` (previously known as `trackNullOrUndefValue()`) to track index value, so that the user knew what Static Analyzer thinks the index is.
Hopefully this will make warnings more understandable. Other ideas for better warnings include adding index and length values to the message and explaining how constraints over index and length evolve along the path.
Additionally, add `printState()` to help debugging the checker later.
Repository:
rC Clang
https://reviews.llvm.org/D55458
Files:
lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
test/Analysis/CFContainers.mm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55458.177299.patch
Type: text/x-patch
Size: 9486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181207/511a43e6/attachment-0001.bin>
More information about the cfe-commits
mailing list