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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to