[cfe-commits] r41079 - /cfe/trunk/Sema/SemaStmt.cpp

Ted Kremenek kremenek at apple.com
Tue Aug 14 11:14:14 PDT 2007


Author: kremenek
Date: Tue Aug 14 13:14:14 2007
New Revision: 41079

URL: http://llvm.org/viewvc/llvm-project?rev=41079&view=rev
Log:
Removed dead variable "hadError" in ParseReturnStmt.

Modified:
    cfe/trunk/Sema/SemaStmt.cpp

Modified: cfe/trunk/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaStmt.cpp?rev=41079&r1=41078&r2=41079&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/Sema/SemaStmt.cpp Tue Aug 14 13:14:14 2007
@@ -324,8 +324,7 @@
   // function return.  
   AssignmentCheckResult result = CheckSingleAssignmentConstraints(lhsType, 
                                                                   RetValExp);
-  bool hadError = false;
-  
+
   // decode the result (notice that extensions still return a type).
   switch (result) {
   case Compatible:
@@ -334,7 +333,6 @@
     Diag(ReturnLoc, diag::err_typecheck_return_incompatible, 
          lhsType.getAsString(), rhsType.getAsString(),
          RetValExp->getSourceRange());
-    hadError = true;
     break;
   case PointerFromInt:
     // check for null pointer constant (C99 6.3.2.3p3)





More information about the cfe-commits mailing list