<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 20, 2011, at 12:54 PM, Richard Trieu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks for the comments, Doug.  I'll look into making the changes, just one quick question.<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div><div><div><div>There are two issues here. The first is that Expr::isIntegerConstantExpr() isn't safe for type- or value-dependent expressions, so we now crash on this ill-formed code:</div>
</div></div></div></div></div></blockquote><div> </div><div>Why does Clang crash here instead of returning false?  I didn't see a reason listed in the source why it crashes or why Expr::isIntegerConstantExpr() isn't safe for type- or value-dependent expressions.</div>
</div>
</blockquote></div><div><br></div><div>Well, we should probably have an assert there, but the design is deliberate: code should not even ask the question about whether it's a constant expression if the expression is type- or value-dependent. It indicates a bug in the caller.</div><br><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Doug</div></body></html>