[cfe-commits] Patch - Add fix-it hint for missing case keyword within a switch scope
dgregor at apple.com
Wed Apr 20 16:08:16 CDT 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits