LGTM, please commit.<br><br><div class="gmail_quote">On Wed, Mar 14, 2012 at 11:39 AM, Matt Beaumont-Gay <span dir="ltr"><<a href="mailto:matthewbg@google.com">matthewbg@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Spotted by ASan via test/Analysis/func.c.<br>
<br>
--- a/lib/Analysis/CallGraph.cpp 2012-03-13 16:21:39.000000000 -0700<br>
+++ b/lib/Analysis/CallGraph.cpp 2012-03-14 11:26:25.000000000 -0700<br>
@@ -133,7 +133,9 @@<br>
}<br>
<br>
CallGraphNode *CallGraph::getNode(const Decl *F) const {<br>
- return FunctionMap.find(F)->second;<br>
+ FunctionMapTy::const_iterator I = FunctionMap.find(F);<br>
+ if (I == FunctionMap.end()) return 0;<br>
+ return I->second;<br>
}<br>
<br>
CallGraphNode *CallGraph::getOrInsertFunction(Decl *F) {<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br>