On Apr 20, 2011, at 12:54 PM, Richard Trieu wrote:
> Thanks for the comments, Doug. I'll look into making the changes, just one
> quick question.
>
> 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:
>
> 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.
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.
- Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits