[cfe-commits] r65969 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.def lib/Sema/SemaStmt.cpp test/SemaObjC/catch-stmt.m
daniel at zuster.org
Tue Mar 3 15:33:34 PST 2009
Thanks Steve, I think an error is appropriate as in practice this will
not do what it looks like. It will behave as @catch of id, so we
should force users to write that unless there is a compelling reason
On Tue, Mar 3, 2009 at 3:16 PM, steve naroff <snaroff at apple.com> wrote:
> 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>
>>> + if (PVD->getType()->isObjCQualifiedIdType())
>>> + return StmtError(Diag(PVD->getLocation(),
>>> + }
>> 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).
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
More information about the cfe-commits