зеркало из https://github.com/microsoft/clang-1.git
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
This commit is contained in:
Родитель
96b1d4b4eb
Коммит
b1fba31453
|
@ -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();
|
||||
|
|
|
@ -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 &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче