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

Steve Naroff snaroff at apple.com
Tue Jun 3 11:12:36 PDT 2008


Understood. The FIXME shouldn't have implied this is hard...I just  
didn't take the time to do it (like many FIXME's throughout the code  
base).

If there were many test cases effected by this, I would have done it.  
Since there weren't, I decided to lazily evaluate it...

snaroff

On Jun 3, 2008, at 11:06 AM, Ted Kremenek wrote:

>
> 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