<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 22, 2008, at 9:21 PM, Zhongxing Xu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">New patch attached.<br><br><div class="gmail_quote">On Thu, Oct 23, 2008 at 9:28 AM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On Oct 22, 2008, at 6:26 PM, Zhongxing Xu wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
This assertion will always be true.  Did you mean assert(false && "...")?<br>
<br>
No, I just don't want the program to crash when things happen, but also put reminder there.<br>
<br>
Then it's not really an assertion.  Just use a comment.<br>
<br>
OK. I'll make it a comment. But I do see others doing this in Clang.<br>
</blockquote>
<br></div>
Those places are probably miswritten assertions.  When you spot them feel free to bring it to everyone's attention or submit a patch.<br>
<br>
Thanks Zhongxing!<br>
</blockquote></div><br>
<span><element2.patch></span></blockquote></div><br><div><div>+SVal RegionStoreManager::ArrayToPointer(SVal Array) {</div><div>+  const MemRegion* ArrayR = cast<loc::MemRegionVal>(&Array)->getRegion();</div><div>+</div><div>+  const VarDecl* D = cast<VarRegion>(ArrayR)->getDecl();</div><div>+</div><div>+  const ConstantArrayType* CAT = </div><div>+    cast<ConstantArrayType>(D->getType().getTypePtr());</div><div><br></div><div>Won't this cast<> fail for VLAs?</div><div><br></div><div>+</div><div>+  BasicValueFactory& BasicVals = StateMgr.getBasicVals();</div><div>+</div><div><br></div><div><br></div><div>Otherwise it looks good!</div></div></body></html>