aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-02-12 18:09:32 +0000
committerSteve Naroff <snaroff@apple.com>2009-02-12 18:09:32 +0000
commit4ab2414f297fab1b290e77bfc3b049ccf45eda81 (patch)
treec4ba0ea37cd583ef8e4d6143402ec027528fe585 /lib/Sema/SemaStmt.cpp
parentd5cab5435371b8cc74a9e05ebd40b5995ebad149 (diff)
Sema::ActOnObjCAtThrowStmt(): return from recently added errors. Thanks Chris!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64389 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 8b2e088b2e..dd505f6967 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/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));