diff options
| author | Steve Naroff <snaroff@apple.com> | 2009-02-12 18:09:32 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2009-02-12 18:09:32 +0000 |
| commit | c49b22a5c8fc665d9108bfdf89ff0c41ed4997d7 (patch) | |
| tree | 650077e81b12311b87f8ef6d42a8f3696c1f0d57 /clang/lib/Sema | |
| parent | 656b097b8a07365e8465d224f21d6c6beabd0be9 (diff) | |
| download | bcm5719-llvm-c49b22a5c8fc665d9108bfdf89ff0c41ed4997d7.tar.gz bcm5719-llvm-c49b22a5c8fc665d9108bfdf89ff0c41ed4997d7.zip | |
Sema::ActOnObjCAtThrowStmt(): return from recently added errors. Thanks Chris!
llvm-svn: 64389
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 8b2e088b2e2..dd505f69673 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -990,15 +990,15 @@ Sema::ActOnObjCAtThrowStmt(SourceLocation AtLoc, ExprArg expr,Scope *CurScope) { while (AtCatchParent && !AtCatchParent->isAtCatchScope()) AtCatchParent = AtCatchParent->getParent(); if (!AtCatchParent) - Diag(AtLoc, diag::error_rethrow_used_outside_catch); + return StmtError(Diag(AtLoc, diag::error_rethrow_used_outside_catch)); } else { QualType ThrowType = ThrowExpr->getType(); // Make sure the expression type is an ObjC pointer or "void *". if (!Context.isObjCObjectPointerType(ThrowType)) { const PointerType *PT = ThrowType->getAsPointerType(); if (!PT || !PT->getPointeeType()->isVoidType()) - Diag(AtLoc, diag::error_objc_throw_expects_object) - << ThrowExpr->getType() << ThrowExpr->getSourceRange(); + return StmtError(Diag(AtLoc, diag::error_objc_throw_expects_object) + << ThrowExpr->getType() << ThrowExpr->getSourceRange()); } } return Owned(new (Context) ObjCAtThrowStmt(AtLoc, ThrowExpr)); |

