diff options
author | Steve Naroff <snaroff@apple.com> | 2009-02-12 15:54:59 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-02-12 15:54:59 +0000 |
commit | 3dcfe10a6801eb52f4c20f1242bea0a3a98aa146 (patch) | |
tree | a5405f57a6b0cf6886aa44f839e5434bedddb4a6 /lib/Sema/SemaStmt.cpp | |
parent | adadd8db2aba32f689e7057d8b7ce004be30685b (diff) |
Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 989de0cdbf..8b2e088b2e 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -981,8 +981,7 @@ Sema::ActOnObjCAtTryStmt(SourceLocation AtLoc, } Action::OwningStmtResult -Sema::ActOnObjCAtThrowStmt(SourceLocation AtLoc, ExprArg expr, - Scope *CurScope) { +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 @@ Sema::ActOnObjCAtThrowStmt(SourceLocation AtLoc, ExprArg expr, 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(); } } |