[cfe-commits] r65969 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.def lib/Sema/SemaStmt.cpp test/SemaObjC/catch-stmt.m

steve naroff snaroff at apple.com
Tue Mar 3 15:16:52 PST 2009

On Mar 3, 2009, at 6:00 PM, Eli Friedman wrote:

> On Tue, Mar 3, 2009 at 1:16 PM, Steve Naroff <snaroff at apple.com>  
> wrote:
>> +    if (PVD->getType()->isObjCQualifiedIdType())
>> +      return StmtError(Diag(PVD->getLocation(),
>> +                        
>> diag::warn_ignoring_qualifiers_on_catch_parm));
>> +  }
> Either it's a warning or it's an error... if it's a warning, you have
> to recover, and if it's an error, you have to mark it as such.  The
> alternative is unintuitive errors or miscompilations when code that
> expects a valid AST gets an invalid one.

Thanks for catching this (I changed it to a warning last minute).

After thinking about it a bit more, decided to make it an error  
(though GCC doesn't diagnose this at all).


> -Eli

More information about the cfe-commits mailing list