[PATCH] D31975: [Analyzer] Iterator Checkers
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 19 21:57:24 PDT 2017
NoQ added a comment.
I think for this case it'd be great to (instead) add comments all over the place (especially in checker callbacks, eg. `check[Pre|Post]Call()` function bodies) to indicate what check every piece of code is for. That'd be equally easy to review, at least for me, but it'd also help greatly if we start splitting up checkers into modelling and checking parts.
================
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:239-241
+REGISTER_MAP_WITH_PROGRAMSTATE(IteratorSymbolMap, SymbolRef, IteratorPosition)
+REGISTER_MAP_WITH_PROGRAMSTATE(IteratorRegionMap, const MemRegion *,
+ IteratorPosition)
----------------
I've got a fresh idea on this: Maybe it'd be easier to make an `llvm::PointerUnion<SymbolRef, const MemRegion *>` and enjoy a single map from that to `IteratorPosition`, rather than maintaining two maps.
I don't insist though, because i didn't really think if it makes the code any simpler.
https://reviews.llvm.org/D31975
More information about the cfe-commits
mailing list