<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Zhongxing,<div><br></div><div>Thanks for doing this.  A couple comments inline.</div><div><br><div><div>On Dec 15, 2008, at 6:36 PM, Zhongxing Xu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=61069&view=rev">http://llvm.org/viewvc/llvm-project?rev=61069&view=rev</a><br>Log:<br>Implement RegionStoreManager::Remove().<br><br>Modified:<br>   cfe/trunk/lib/Analysis/RegionStore.cpp<br><br>Modified: cfe/trunk/lib/Analysis/RegionStore.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=61069&r1=61068&r2=61069&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=61069&r1=61068&r2=61069&view=diff</a><br><br>==============================================================================<br>--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)<br>+++ cfe/trunk/lib/Analysis/RegionStore.cpp Mon Dec 15 20:36:30 2008<br>@@ -111,10 +111,7 @@<br><br>+Store RegionStoreManager::Remove(Store store, Loc L) {<br>+  RegionBindingsTy B = GetRegionBindings(store);<br>+<br>+  const MemRegion* R = cast<loc::MemRegionVal>(L).getRegion();<br>+  assert(R);</span></blockquote><div><br></div><div>This assertion seems bogus.  If Remove should always expect a MemRegion* then we should change its interface to accept that as an argument instead of a Loc value.  Otherwise, Remove should handle the case when 'L' isn't a region.</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">+<br>+  return RBFactory.Remove(B, R).getRoot();<br>+}</span></blockquote><div><br></div><div>Do we plan on inserting Unknown into the map to marked the value as killed?  If so, we should only do that if it was in the map in the first place.</div></div></div></body></html>