diff options
author | Anders Carlsson <andersca@mac.com> | 2011-02-19 21:53:09 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-02-19 21:53:09 +0000 |
commit | b1fba3145392dc0cf54691576a4e6141e5081869 (patch) | |
tree | d78aa2b6f3a6230b4199bab6855dfc507fe7394b | |
parent | 96b1d4b4eb6b18dd6df7a2c0833332b45840580f (diff) |
There's no need to return early if we encounter a try/throw and exceptions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126053 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 07e6b6f14b..0d48741387 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -477,7 +477,7 @@ Sema::ActOnCXXNullPtrLiteral(SourceLocation Loc) { ExprResult Sema::ActOnCXXThrow(SourceLocation OpLoc, Expr *Ex) { if (!getLangOptions().Exceptions) - return Diag(OpLoc, diag::err_exceptions_disabled) << "throw"; + Diag(OpLoc, diag::err_exceptions_disabled) << "throw"; if (Ex && !Ex->isTypeDependent() && CheckCXXThrowOperand(OpLoc, Ex)) return ExprError(); diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 523fc4a852..61ab3d3a5b 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -1742,7 +1742,7 @@ StmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, MultiStmtArg RawHandlers) { if (!getLangOptions().Exceptions) - return Diag(TryLoc, diag::err_exceptions_disabled) << "try"; + Diag(TryLoc, diag::err_exceptions_disabled) << "try"; unsigned NumHandlers = RawHandlers.size(); assert(NumHandlers > 0 && |