diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-01-05 00:49:17 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-01-05 00:49:17 +0000 |
commit | 79430e9983f5e67a378fc1f50cd6278f2cea8259 (patch) | |
tree | 81a88412c45474899b84486a91747ed1c7f2b20a | |
parent | 39afcafe1c0f66db67648b5230b700659448432c (diff) |
Minor cleanup; no functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147582 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index d79218d849..d7489d418e 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -1791,8 +1791,7 @@ Sema::ActOnBlockReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) { QualType FnRetType = CurBlock->ReturnType; if (CurBlock->FunctionType->getAs<FunctionType>()->getNoReturnAttr()) { - Diag(ReturnLoc, diag::err_noreturn_block_has_return_expr) - << getCurFunctionOrMethodDecl()->getDeclName(); + Diag(ReturnLoc, diag::err_noreturn_block_has_return_expr); return StmtError(); } @@ -1869,7 +1868,7 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) { if (FD->hasAttr<NoReturnAttr>() || FD->getType()->getAs<FunctionType>()->getNoReturnAttr()) Diag(ReturnLoc, diag::warn_noreturn_function_has_return_expr) - << getCurFunctionOrMethodDecl()->getDeclName(); + << FD->getDeclName(); } else if (ObjCMethodDecl *MD = getCurMethodDecl()) { DeclaredRetType = MD->getResultType(); if (MD->hasRelatedResultType() && MD->getClassInterface()) { |