[cfe-dev] Constant expression checking rewrite

Ted Kremenek kremenek at apple.com
Fri May 16 14:27:21 PDT 2008


On May 16, 2008, at 2:20 PM, Eli Friedman wrote:

> If Expr::isConstantExpr in the sense that it is currently implemented
> is useful for outside code to query, I can refactor the code to
> calculate it.  However, that will make things more complicated, and I
> don't think we need it. Being a constant expression in the C99 sense
> is not really an interesting property for any purpose I can think of.
> Besides Sema, there are only a couple of other users in the current
> codebase, and neither of them really want precisely what
> Expr::isConstantExpr returns.

Hi Eli,

I'm not parsing the first couple sentences of this paragraph very  
well.  Can you please elaborate?  I'm also not certain what you mean  
by "Being a constant expression in the C99 sense is not really an  
interesting property for any purpose I can think of."

It is very useful for isConstantExpr to evaluate the actual value of  
the expression as an APSInt constant.

Ted



More information about the cfe-dev mailing list