[cfe-commits] r147582 - /cfe/trunk/lib/Sema/SemaStmt.cpp

Eli Friedman eli.friedman at gmail.com
Wed Jan 4 16:49:17 PST 2012


Author: efriedma
Date: Wed Jan  4 18:49:17 2012
New Revision: 147582

URL: http://llvm.org/viewvc/llvm-project?rev=147582&view=rev
Log:
Minor cleanup; no functional change.


Modified:
    cfe/trunk/lib/Sema/SemaStmt.cpp

Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=147582&r1=147581&r2=147582&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Wed Jan  4 18:49:17 2012
@@ -1791,8 +1791,7 @@
   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 @@
     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()) {





More information about the cfe-commits mailing list