[PATCH] D26373: [analyzer] Provide Contains() on ImmutableMap program state partial trait.

Devin Coughlin via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 7 16:38:39 PST 2016


dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.

This seems reasonable and it looks good to me (as long as there is a later patch coming that calls the new method).

However: is there a situation where `Contains()` is preferable to `Lookup()`? It seems to me that in some cases you would want the looked-up value -- and in those where you don't there is no cost to return a pointer to it. As far as I can tell both ultimately end up as a call to `find()` on the AVL tree.


https://reviews.llvm.org/D26373





More information about the cfe-commits mailing list