On Feb 12, 2009, at 7:55 AM, Steve Naroff wrote:

> +Sema::ActOnObjCAtThrowStmt(SourceLocation AtLoc, ExprArg expr,Scope  
> *CurScope) {
>   Expr *ThrowExpr = static_cast<Expr*>(expr.release());
>   if (!ThrowExpr) {
>     // @throw without an expression designates a rethrow (which much  
> occur
> @@ -998,8 +997,7 @@
>     if (!Context.isObjCObjectPointerType(ThrowType)) {
>       const PointerType *PT = ThrowType->getAsPointerType();
>       if (!PT || !PT->getPointeeType()->isVoidType())
> -        // This should be an error, however GCC only yields a  
> warning.
> -        Diag(AtLoc, diag::warn_objc_throw_expects_object)
> +        Diag(AtLoc, diag::error_objc_throw_expects_object)
>                     << ThrowExpr->getType() << ThrowExpr- 
> >getSourceRange();
>     }
>

I think this should "return true;" after the error so that we don't  
create and return an invalid AST.

-Chris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to