[cfe-commits] r51907 - in /cfe/trunk: lib/AST/Expr.cpp test/Sema/gcc-cast-ext.m

Ted Kremenek kremenek at apple.com
Tue Jun 3 11:06:34 PDT 2008


On Jun 3, 2008, at 10:54 AM, Steve Naroff wrote:

>> This is no good: this potentially breaks standards-compliant code (as
>> I said in reply to the mail you sent to cfe-dev), and it's completely
>> impossible to warn for illegal cases.
>
> If Expr had access to langOptions(), why is this impossible to warn
> about?

Since an ASTContext& is passed to Expr::isIntegerConstantExpr, it  
seems that adding getLangOptions() to ASTContext would solve this  
problem. This wouldn't be that hard to do, since ASTContext is only  
constructed in a few places.



More information about the cfe-commits mailing list