[cfe-commits] r140407 - in /cfe/trunk: include/clang/AST/ lib/AST/ lib/Analysis/ lib/CodeGen/ lib/Driver/ lib/Index/ lib/Parse/ lib/Sema/ lib/Serialization/ lib/StaticAnalyzer/Core/ tools/libclang/

David Blaikie dblaikie at gmail.com
Fri Sep 23 13:26:49 PDT 2011


Author: dblaikie
Date: Fri Sep 23 15:26:49 2011
New Revision: 140407

URL: http://llvm.org/viewvc/llvm-project?rev=140407&view=rev
Log:
Removing a bunch of dead returns/breaks after llvm_unreachables.

Modified:
    cfe/trunk/include/clang/AST/Attr.h
    cfe/trunk/include/clang/AST/Stmt.h
    cfe/trunk/lib/AST/ASTContext.cpp
    cfe/trunk/lib/AST/Decl.cpp
    cfe/trunk/lib/AST/DeclBase.cpp
    cfe/trunk/lib/AST/DeclCXX.cpp
    cfe/trunk/lib/AST/DeclObjC.cpp
    cfe/trunk/lib/AST/DeclPrinter.cpp
    cfe/trunk/lib/AST/DeclarationName.cpp
    cfe/trunk/lib/AST/Expr.cpp
    cfe/trunk/lib/AST/ExprConstant.cpp
    cfe/trunk/lib/AST/ItaniumMangle.cpp
    cfe/trunk/lib/AST/MicrosoftMangle.cpp
    cfe/trunk/lib/AST/TemplateBase.cpp
    cfe/trunk/lib/Analysis/FormatString.cpp
    cfe/trunk/lib/CodeGen/CGCall.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CGExpr.cpp
    cfe/trunk/lib/CodeGen/CGExprAgg.cpp
    cfe/trunk/lib/CodeGen/CGExprComplex.cpp
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
    cfe/trunk/lib/CodeGen/CGStmt.cpp
    cfe/trunk/lib/CodeGen/CGVTables.cpp
    cfe/trunk/lib/CodeGen/CodeGenAction.cpp
    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
    cfe/trunk/lib/CodeGen/TargetInfo.cpp
    cfe/trunk/lib/Driver/Action.cpp
    cfe/trunk/lib/Driver/Driver.cpp
    cfe/trunk/lib/Driver/Option.cpp
    cfe/trunk/lib/Driver/Phases.cpp
    cfe/trunk/lib/Index/ASTLocation.cpp
    cfe/trunk/lib/Parse/ParseExprCXX.cpp
    cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp
    cfe/trunk/lib/Sema/SemaDecl.cpp
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp
    cfe/trunk/lib/Sema/SemaExpr.cpp
    cfe/trunk/lib/Sema/SemaExprCXX.cpp
    cfe/trunk/lib/Sema/SemaOverload.cpp
    cfe/trunk/lib/Sema/SemaStmt.cpp
    cfe/trunk/lib/Sema/SemaTemplate.cpp
    cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
    cfe/trunk/lib/Sema/SemaType.cpp
    cfe/trunk/lib/Sema/TreeTransform.h
    cfe/trunk/lib/Serialization/ASTReader.cpp
    cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
    cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp
    cfe/trunk/tools/libclang/CIndexDiagnostic.cpp

Modified: cfe/trunk/include/clang/AST/Attr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Attr.h?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Attr.h (original)
+++ cfe/trunk/include/clang/AST/Attr.h Fri Sep 23 15:26:49 2011
@@ -68,7 +68,6 @@
   
   void* operator new(size_t bytes) throw() {
     llvm_unreachable("Attrs cannot be allocated with regular 'new'.");
-    return 0;
   }
   void operator delete(void* data) throw() {
     llvm_unreachable("Attrs cannot be released with regular 'delete'.");

Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Fri Sep 23 15:26:49 2011
@@ -108,7 +108,6 @@
 protected:
   void* operator new(size_t bytes) throw() {
     llvm_unreachable("Stmts cannot be allocated with regular 'new'.");
-    return 0;
   }
   void operator delete(void* data) throw() {
     llvm_unreachable("Stmts cannot be released with regular 'delete'.");

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Fri Sep 23 15:26:49 2011
@@ -3219,7 +3219,6 @@
 
   // Silence GCC warning
   llvm_unreachable("Unhandled template argument kind");
-  return TemplateArgument();
 }
 
 NestedNameSpecifier *
@@ -4919,7 +4918,6 @@
   }
 
   llvm_unreachable("Unhandled TargetInfo::IntType value");
-  return CanQualType();
 }
 
 //===----------------------------------------------------------------------===//
@@ -5749,13 +5747,11 @@
 #define DEPENDENT_TYPE(Class, Base) case Type::Class:
 #include "clang/AST/TypeNodes.def"
     llvm_unreachable("Non-canonical and dependent types shouldn't get here");
-    return QualType();
 
   case Type::LValueReference:
   case Type::RValueReference:
   case Type::MemberPointer:
     llvm_unreachable("C++ should never be in mergeTypes");
-    return QualType();
 
   case Type::ObjCInterface:
   case Type::IncompleteArray:
@@ -5763,7 +5759,6 @@
   case Type::FunctionProto:
   case Type::ExtVector:
     llvm_unreachable("Types are eliminated above");
-    return QualType();
 
   case Type::Pointer:
   {
@@ -6015,7 +6010,6 @@
     return UnsignedInt128Ty;
   default:
     llvm_unreachable("Unexpected signed integer type");
-    return QualType();
   }
 }
 
@@ -6476,7 +6470,6 @@
     return createMicrosoftMangleContext(*this, getDiagnostics());
   }
   llvm_unreachable("Unsupported ABI");
-  return 0;
 }
 
 CXXABI::~CXXABI() {}

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Fri Sep 23 15:26:49 2011
@@ -1891,7 +1891,6 @@
     return TK_DependentFunctionTemplateSpecialization;
 
   llvm_unreachable("Did we miss a TemplateOrSpecialization type?");
-  return TK_NonTemplate;
 }
 
 FunctionDecl *FunctionDecl::getInstantiatedFromMemberFunction() const {

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Fri Sep 23 15:26:49 2011
@@ -572,7 +572,6 @@
         return static_cast<NAME##Decl*>(const_cast<DeclContext*>(D));
 #include "clang/AST/DeclNodes.inc"
       llvm_unreachable("a decl that inherits DeclContext isn't handled");
-      return 0;
   }
 }
 
@@ -592,7 +591,6 @@
         return static_cast<NAME##Decl*>(const_cast<Decl*>(D));
 #include "clang/AST/DeclNodes.inc"
       llvm_unreachable("a decl that inherits DeclContext isn't handled");
-      return 0;
   }
 }
 

Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Fri Sep 23 15:26:49 2011
@@ -1694,7 +1694,6 @@
     default:
     case AS_none:
       llvm_unreachable("Invalid access specifier!");
-      return 0;
     case AS_public:
       return "public";
     case AS_private:

Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Fri Sep 23 15:26:49 2011
@@ -550,7 +550,6 @@
 
   assert(!isa<ObjCProtocolDecl>(getDeclContext()) && "It's a protocol method");
   llvm_unreachable("unknown method context");
-  return 0;
 }
 
 //===----------------------------------------------------------------------===//
@@ -782,7 +781,6 @@
   case ObjCCategoryImpl:
   case ObjCProtocol:
     llvm_unreachable("invalid ivar container!");
-    return 0;
 
     // Ivars can only appear in class extension categories.
   case ObjCCategory: {

Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Fri Sep 23 15:26:49 2011
@@ -192,7 +192,7 @@
 
 void DeclPrinter::Print(AccessSpecifier AS) {
   switch(AS) {
-  case AS_none:      llvm_unreachable("No access specifier!"); break;
+  case AS_none:      llvm_unreachable("No access specifier!");
   case AS_public:    Out << "public"; break;
   case AS_protected: Out << "protected"; break;
   case AS_private:   Out << "private"; break;

Modified: cfe/trunk/lib/AST/DeclarationName.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclarationName.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclarationName.cpp (original)
+++ cfe/trunk/lib/AST/DeclarationName.cpp Fri Sep 23 15:26:49 2011
@@ -194,7 +194,6 @@
 
   // Can't actually get here.
   llvm_unreachable("This should be unreachable!");
-  return Identifier;
 }
 
 bool DeclarationName::isDependentName() const {
@@ -340,7 +339,6 @@
   default:
     llvm_unreachable("Declaration name has no FETokenInfo");
   }
-  return 0;
 }
 
 void DeclarationName::setFETokenInfo(void *T) {
@@ -622,5 +620,4 @@
     return NameLoc;
   }
   llvm_unreachable("Unexpected declaration name kind");
-  return SourceLocation();
 }

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Fri Sep 23 15:26:49 2011
@@ -2503,8 +2503,6 @@
     switch (NPC) {
     case NPC_NeverValueDependent:
       llvm_unreachable("Unexpected value dependent expression!");
-      // If the unthinkable happens, fall through to the safest alternative.
-        
     case NPC_ValueDependentIsNull:
       if (isTypeDependent() || getType()->isIntegralType(Ctx))
         return NPCK_ZeroInteger;

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Fri Sep 23 15:26:49 2011
@@ -389,7 +389,6 @@
 
   RetTy VisitStmt(const Stmt *) {
     llvm_unreachable("Expression evaluator should not be called on stmts");
-    return DerivedError(0);
   }
   RetTy VisitExpr(const Expr *E) {
     return DerivedError(E);

Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Fri Sep 23 15:26:49 2011
@@ -1070,7 +1070,6 @@
   case DeclarationName::ObjCOneArgSelector:
   case DeclarationName::ObjCMultiArgSelector:
     llvm_unreachable("Can't mangle Objective-C selector names here!");
-    break;
 
   case DeclarationName::CXXConstructorName:
     if (ND == Structor)
@@ -1125,7 +1124,6 @@
 
   case DeclarationName::CXXUsingDirective:
     llvm_unreachable("Can't mangle a using directive name!");
-    break;
   }
 }
 
@@ -1513,7 +1511,6 @@
   case OO_None:
   case NUM_OVERLOADED_OPERATORS:
     llvm_unreachable("Not an overloaded operator");
-    break;
   }
 }
 

Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Fri Sep 23 15:26:49 2011
@@ -333,15 +333,12 @@
     case DeclarationName::ObjCOneArgSelector:
     case DeclarationName::ObjCMultiArgSelector:
       llvm_unreachable("Can't mangle Objective-C selector names here!");
-      break;
       
     case DeclarationName::CXXConstructorName:
       llvm_unreachable("Can't mangle constructors yet!");
-      break;
       
     case DeclarationName::CXXDestructorName:
       llvm_unreachable("Can't mangle destructors yet!");
-      break;
       
     case DeclarationName::CXXConversionFunctionName:
       // <operator-name> ::= ?B # (cast)
@@ -356,11 +353,9 @@
     case DeclarationName::CXXLiteralOperatorName:
       // FIXME: Was this added in VS2010? Does MS even know how to mangle this?
       llvm_unreachable("Don't know how to mangle literal operators yet!");
-      break;
       
     case DeclarationName::CXXUsingDirective:
       llvm_unreachable("Can't mangle a using directive name!");
-      break;
   }
 }
 
@@ -514,12 +509,10 @@
     
   case OO_Conditional:
     llvm_unreachable("Don't know how to mangle ?:");
-    break;
     
   case OO_None:
   case NUM_OVERLOADED_OPERATORS:
     llvm_unreachable("Not an overloaded operator");
-    break;
   }
 }
 
@@ -714,7 +707,6 @@
   case BuiltinType::BoundMember:
     llvm_unreachable(
            "Overloaded and dependent types shouldn't get to name mangling");
-    break;
   case BuiltinType::ObjCId: Out << "PAUobjc_object@@"; break;
   case BuiltinType::ObjCClass: Out << "PAUobjc_class@@"; break;
   case BuiltinType::ObjCSel: Out << "PAUobjc_selector@@"; break;
@@ -723,7 +715,6 @@
   case BuiltinType::Char32:
   case BuiltinType::NullPtr:
     llvm_unreachable("Don't know how to mangle this type");
-    break;
   }
 }
 

Modified: cfe/trunk/lib/AST/TemplateBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TemplateBase.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/TemplateBase.cpp (original)
+++ cfe/trunk/lib/AST/TemplateBase.cpp Fri Sep 23 15:26:49 2011
@@ -69,7 +69,6 @@
   switch (getKind()) {
   case Null:
     llvm_unreachable("Should not have a NULL template argument");
-    return false;
 
   case Type:
     return getAsType()->isDependentType();
@@ -108,7 +107,6 @@
   switch (getKind()) {
   case Null:
     llvm_unreachable("Should not have a NULL template argument");
-    return false;
     
   case Type:
     return getAsType()->isInstantiationDependentType();

Modified: cfe/trunk/lib/Analysis/FormatString.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/FormatString.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/FormatString.cpp (original)
+++ cfe/trunk/lib/Analysis/FormatString.cpp Fri Sep 23 15:26:49 2011
@@ -210,7 +210,6 @@
   switch (K) {
     case InvalidTy:
       llvm_unreachable("ArgTypeResult must be valid");
-      return true;
 
     case UnknownTy:
       return true;
@@ -313,7 +312,6 @@
   switch (K) {
     case InvalidTy:
       llvm_unreachable("No representative type for Invalid ArgTypeResult");
-      // Fall-through.
     case UnknownTy:
       return QualType();
     case SpecificTy:

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Sep 23 15:26:49 2011
@@ -1864,7 +1864,6 @@
   }
 
   llvm_unreachable("Unhandled ABIArgInfo::Kind");
-  return RValue::get(0);
 }
 
 /* VarArg handling */

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Sep 23 15:26:49 2011
@@ -291,16 +291,12 @@
   switch (BT->getKind()) {
   case BuiltinType::Dependent:
     llvm_unreachable("Unexpected builtin type Dependent");
-    return llvm::DIType();
   case BuiltinType::Overload:
     llvm_unreachable("Unexpected builtin type Overload");
-    return llvm::DIType();
   case BuiltinType::BoundMember:
     llvm_unreachable("Unexpected builtin type BoundMember");
-    return llvm::DIType();
   case BuiltinType::UnknownAny:
     llvm_unreachable("Unexpected builtin type UnknownAny");
-    return llvm::DIType();
   case BuiltinType::NullPtr:
     return DBuilder.
       createNullPtrType(BT->getName(CGM.getContext().getLangOptions()));

Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Fri Sep 23 15:26:49 2011
@@ -1795,7 +1795,6 @@
     return EmitFunctionDeclLValue(*this, E, FD);
 
   llvm_unreachable("Unhandled member declaration!");
-  return LValue();
 }
 
 LValue CodeGenFunction::EmitLValueForBitfield(llvm::Value *BaseValue,

Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Fri Sep 23 15:26:49 2011
@@ -320,7 +320,6 @@
   case CK_UncheckedDerivedToBase: {
     llvm_unreachable("cannot perform hierarchy conversion in EmitAggExpr: "
                 "should have been unpacked before we got here");
-    break;
   }
 
   case CK_GetObjCProperty: {

Modified: cfe/trunk/lib/CodeGen/CGExprComplex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprComplex.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprComplex.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprComplex.cpp Fri Sep 23 15:26:49 2011
@@ -104,7 +104,6 @@
   ComplexPairTy VisitStmt(Stmt *S) {
     S->dump(CGF.getContext().getSourceManager());
     llvm_unreachable("Stmt can't have complex result type!");
-    return ComplexPairTy();
   }
   ComplexPairTy VisitExpr(Expr *S);
   ComplexPairTy VisitParenExpr(ParenExpr *PE) { return Visit(PE->getSubExpr());}

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Fri Sep 23 15:26:49 2011
@@ -781,9 +781,6 @@
       return 0;
 
     llvm_unreachable("Unable to handle InitListExpr");
-    // Get rid of control reaches end of void function warning.
-    // Not reached.
-    return 0;
   }
 
   llvm::Constant *VisitCXXConstructExpr(CXXConstructExpr *E) {
@@ -967,7 +964,6 @@
     switch (Result.Val.getKind()) {
     case APValue::Uninitialized:
       llvm_unreachable("Constant expressions should be initialized.");
-      return 0;
     case APValue::LValue: {
       llvm::Type *DestTy = getTypes().ConvertTypeForMem(DestType);
       llvm::Constant *Offset =

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Fri Sep 23 15:26:49 2011
@@ -154,7 +154,6 @@
   Value *VisitStmt(Stmt *S) {
     S->dump(CGF.getContext().getSourceManager());
     llvm_unreachable("Stmt can't have complex result type!");
-    return 0;
   }
   Value *VisitExpr(Expr *S);
   
@@ -1264,10 +1263,8 @@
     BinOp.Opcode = BO_Add;
     BinOp.E = E;
     return EmitOverflowCheckedBinOp(BinOp);
-    break;
   }
   llvm_unreachable("Unknown SignedOverflowBehaviorTy");
-  return 0;
 }
 
 llvm::Value *
@@ -2756,7 +2753,6 @@
   case BO_Assign:
   case BO_Comma:
     llvm_unreachable("Not valid compound assignment operators");
-    break;
   }
    
   llvm_unreachable("Unhandled compound assignment operator");

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Fri Sep 23 15:26:49 2011
@@ -1061,7 +1061,6 @@
   /// class of the given name.
   virtual llvm::GlobalVariable *GetClassGlobal(const std::string &Name) {
     llvm_unreachable("CGObjCMac::GetClassGlobal");
-    return 0;
   }
 };
 

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Fri Sep 23 15:26:49 2011
@@ -139,11 +139,9 @@
   case Stmt::ObjCAtCatchStmtClass:
     llvm_unreachable(
                     "@catch statements should be handled by EmitObjCAtTryStmt");
-    break;
   case Stmt::ObjCAtFinallyStmtClass:
     llvm_unreachable(
                   "@finally statements should be handled by EmitObjCAtTryStmt");
-    break;
   case Stmt::ObjCAtThrowStmtClass:
     EmitObjCAtThrowStmt(cast<ObjCAtThrowStmt>(*S));
     break;

Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Fri Sep 23 15:26:49 2011
@@ -264,7 +264,6 @@
   if (!const_cast<CXXRecordDecl *>(DerivedRD)->
       isDerivedFrom(const_cast<CXXRecordDecl *>(BaseRD), Paths)) {
     llvm_unreachable("Class must be derived from the passed in base class!");
-    return BaseOffset();
   }
 
   return ComputeBaseOffset(Context, DerivedRD, Paths.front());
@@ -701,7 +700,6 @@
   }
   
   llvm_unreachable("Should always find a vcall offset offset!");
-  return CharUnits::Zero();
 }
 
 /// VCallAndVBaseOffsetBuilder - Class for building vcall and vbase offsets.
@@ -1362,7 +1360,6 @@
   if (!const_cast<CXXRecordDecl *>(DerivedRD)->
       isDerivedFrom(const_cast<CXXRecordDecl *>(BaseRD), Paths)) {
     llvm_unreachable("Class must be derived from the passed in base class!");
-    return BaseOffset();
   }
 
   // We have to go through all the paths, and see which one leads us to the

Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Fri Sep 23 15:26:49 2011
@@ -276,7 +276,6 @@
   }
 
   llvm_unreachable("Invalid action!");
-  return 0;
 }
 
 ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI,

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Fri Sep 23 15:26:49 2011
@@ -274,7 +274,6 @@
   if (&format == &llvm::APFloat::x87DoubleExtended)
     return llvm::Type::getX86_FP80Ty(VMContext);
   llvm_unreachable("Unknown float format!");
-  return 0;
 }
 
 /// ConvertType - Convert the specified type to its LLVM form.

Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Fri Sep 23 15:26:49 2011
@@ -1893,7 +1893,6 @@
   case X87:
   case ComplexX87:
     llvm_unreachable("Invalid classification for hi word.");
-    break;
 
   case NoClass: break;
 

Modified: cfe/trunk/lib/Driver/Action.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Action.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Action.cpp (original)
+++ cfe/trunk/lib/Driver/Action.cpp Fri Sep 23 15:26:49 2011
@@ -36,7 +36,6 @@
   }
 
   llvm_unreachable("invalid class");
-  return 0;
 }
 
 InputAction::InputAction(const Arg &_Input, types::ID _Type)

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Sep 23 15:26:49 2011
@@ -1114,7 +1114,6 @@
   }
 
   llvm_unreachable("invalid phase in ConstructPhaseAction");
-  return 0;
 }
 
 bool Driver::IsUsingLTO(const ArgList &Args) const {

Modified: cfe/trunk/lib/Driver/Option.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Option.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Option.cpp (original)
+++ cfe/trunk/lib/Driver/Option.cpp Fri Sep 23 15:26:49 2011
@@ -116,7 +116,6 @@
 
 Arg *OptionGroup::accept(const ArgList &Args, unsigned &Index) const {
   llvm_unreachable("accept() should never be called on an OptionGroup");
-  return 0;
 }
 
 InputOption::InputOption(OptSpecifier ID)
@@ -125,7 +124,6 @@
 
 Arg *InputOption::accept(const ArgList &Args, unsigned &Index) const {
   llvm_unreachable("accept() should never be called on an InputOption");
-  return 0;
 }
 
 UnknownOption::UnknownOption(OptSpecifier ID)
@@ -134,7 +132,6 @@
 
 Arg *UnknownOption::accept(const ArgList &Args, unsigned &Index) const {
   llvm_unreachable("accept() should never be called on an UnknownOption");
-  return 0;
 }
 
 FlagOption::FlagOption(OptSpecifier ID, const char *Name,

Modified: cfe/trunk/lib/Driver/Phases.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Phases.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Phases.cpp (original)
+++ cfe/trunk/lib/Driver/Phases.cpp Fri Sep 23 15:26:49 2011
@@ -24,5 +24,4 @@
   }
 
   llvm_unreachable("Invalid phase id.");
-  return 0;
 }

Modified: cfe/trunk/lib/Index/ASTLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/ASTLocation.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Index/ASTLocation.cpp (original)
+++ cfe/trunk/lib/Index/ASTLocation.cpp Fri Sep 23 15:26:49 2011
@@ -61,7 +61,6 @@
 
   switch (getKind()) {
   default: llvm_unreachable("Invalid Kind");
-    return SourceRange();
   case N_Decl:
     return D->getSourceRange();
   case N_Stmt:

Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Fri Sep 23 15:26:49 2011
@@ -30,7 +30,6 @@
     case tok::kw_static_cast:      return 4;
     default:
       llvm_unreachable("Unknown type for digraph error message.");
-      return -1;
   }
 }
 
@@ -784,7 +783,7 @@
   const char *CastName = 0;     // For error messages
 
   switch (Kind) {
-  default: llvm_unreachable("Unknown C++ cast!"); abort();
+  default: llvm_unreachable("Unknown C++ cast!");
   case tok::kw_const_cast:       CastName = "const_cast";       break;
   case tok::kw_dynamic_cast:     CastName = "dynamic_cast";     break;
   case tok::kw_reinterpret_cast: CastName = "reinterpret_cast"; break;
@@ -1292,7 +1291,6 @@
     llvm_unreachable("Annotation token should already be formed!");
   default:
     llvm_unreachable("Not a simple-type-specifier token!");
-    abort();
 
   // type-name
   case tok::annot_typename: {

Modified: cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp Fri Sep 23 15:26:49 2011
@@ -138,7 +138,6 @@
   switch (NNS->getKind()) {
   case NestedNameSpecifier::Identifier:
     llvm_unreachable("Dependent nested-name-specifier has no DeclContext");
-    break;
 
   case NestedNameSpecifier::Namespace:
     return NNS->getAsNamespace();

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Fri Sep 23 15:26:49 2011
@@ -3401,7 +3401,6 @@
     
   default:
     llvm_unreachable("Unknown type specifier kind in CodeCompleteTag");
-    return;
   }
   
   ResultBuilder Results(*this, CodeCompleter->getAllocator(), ContextKind);

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Sep 23 15:26:49 2011
@@ -2938,7 +2938,6 @@
   } // switch (Name.getKind())
 
   llvm_unreachable("Unknown name kind");
-  return DeclarationNameInfo();
 }
 
 static QualType getCoreType(QualType Ty) {
@@ -8375,7 +8374,6 @@
       }
 
       llvm_unreachable("found no user-declared constructors");
-      return;
     }
     break;
 
@@ -8460,7 +8458,7 @@
   case CXXDestructor:
     hasTrivial = &CXXRecordDecl::hasTrivialDestructor; break;
   default:
-    llvm_unreachable("unexpected special member"); return;
+    llvm_unreachable("unexpected special member");
   }
 
   // Check for nontrivial bases (and recurse).

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Fri Sep 23 15:26:49 2011
@@ -3206,7 +3206,6 @@
   switch (Attr.getKind()) {
     default:
       llvm_unreachable("invalid ownership attribute");
-      return;
     case AttributeList::AT_ns_returns_autoreleased:
       D->addAttr(::new (S.Context) NSReturnsAutoreleasedAttr(Attr.getRange(),
                                                              S.Context));

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Fri Sep 23 15:26:49 2011
@@ -9978,7 +9978,6 @@
 
     case CXXInvalid:
       llvm_unreachable("Invalid special member.");
-      break;
     }
   } else {
     Diag(DefaultLoc, diag::err_default_special_members);

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Sep 23 15:26:49 2011
@@ -8942,7 +8942,6 @@
     Ty = Context.LongLongTy;
   else {
     llvm_unreachable("I don't know size of pointer!");
-    Ty = Context.IntTy;
   }
 
   return Owned(new (Context) GNUNullExpr(Ty, TokenLoc));

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Sep 23 15:26:49 2011
@@ -1526,7 +1526,6 @@
   }
   }
   llvm_unreachable("Unreachable, bad result from BestViableFunction");
-  return true;
 }
 
 
@@ -2182,7 +2181,6 @@
 
   case ImplicitConversionSequence::EllipsisConversion:
     llvm_unreachable("Cannot perform an ellipsis conversion");
-    return Owned(From);
 
   case ImplicitConversionSequence::BadConversion:
     return ExprError();
@@ -2285,7 +2283,6 @@
 
   default:
     llvm_unreachable("Improper first standard conversion");
-    break;
   }
 
   // Perform the second implicit conversion
@@ -2525,7 +2522,6 @@
   case ICK_Qualification:
   case ICK_Num_Conversion_Kinds:
     llvm_unreachable("Improper second standard conversion");
-    break;
   }
 
   switch (SCS.Third) {
@@ -2551,7 +2547,6 @@
 
   default:
     llvm_unreachable("Improper third standard conversion");
-    break;
   }
 
   return Owned(From);
@@ -3561,7 +3556,6 @@
 
     case OR_Deleted:
       llvm_unreachable("Conditional operator has only built-in overloads");
-      break;
   }
   return true;
 }

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Sep 23 15:26:49 2011
@@ -6334,7 +6334,6 @@
   case OO_None:
   case NUM_OVERLOADED_OPERATORS:
     llvm_unreachable("Expected an overloaded operator");
-    break;
 
   case OO_New:
   case OO_Delete:
@@ -6343,7 +6342,6 @@
   case OO_Call:
     llvm_unreachable(
                     "Special operators don't use AddBuiltinOperatorCandidates");
-    break;
 
   case OO_Comma:
   case OO_Arrow:

Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Fri Sep 23 15:26:49 2011
@@ -1388,7 +1388,6 @@
         // Can't be a DependentSizedArrayType or an IncompleteArrayType since
         // UnqAT is not incomplete and Range is not type-dependent.
         llvm_unreachable("Unexpected array type in for-range");
-        return StmtError();
       }
 
       // end-expr is __range + __bound.

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Fri Sep 23 15:26:49 2011
@@ -2683,7 +2683,6 @@
     switch (Arg.getArgument().getKind()) {
     case TemplateArgument::Null:
       llvm_unreachable("Should never see a NULL template argument here");
-      return true;
 
     case TemplateArgument::Expression: {
       TemplateArgument Result;
@@ -2806,7 +2805,6 @@
   switch (Arg.getArgument().getKind()) {
   case TemplateArgument::Null:
     llvm_unreachable("Should never see a NULL template argument here");
-    return true;
 
   case TemplateArgument::Template:
   case TemplateArgument::TemplateExpansion:
@@ -5218,7 +5216,6 @@
   case TSK_Undeclared:
   case TSK_ImplicitInstantiation:
     llvm_unreachable("Don't check implicit instantiations here");
-    return false;
 
   case TSK_ExplicitSpecialization:
     switch (PrevTSK) {
@@ -5351,8 +5348,6 @@
   }
 
   llvm_unreachable("Missing specialization/instantiation case?");
-
-  return false;
 }
 
 /// \brief Perform semantic analysis for the given dependent function

Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Fri Sep 23 15:26:49 2011
@@ -1540,7 +1540,6 @@
   switch (Param.getKind()) {
   case TemplateArgument::Null:
     llvm_unreachable("Null template argument in parameter list");
-    break;
 
   case TemplateArgument::Type:
     if (Arg.getKind() == TemplateArgument::Type)
@@ -1831,7 +1830,6 @@
   switch (X.getKind()) {
     case TemplateArgument::Null:
       llvm_unreachable("Comparing NULL template argument");
-      break;
 
     case TemplateArgument::Type:
       return Context.getCanonicalType(X.getAsType()) ==

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Fri Sep 23 15:26:49 2011
@@ -97,7 +97,6 @@
 Decl *
 TemplateDeclInstantiator::VisitTranslationUnitDecl(TranslationUnitDecl *D) {
   llvm_unreachable("Translation units cannot be instantiated");
-  return D;
 }
 
 Decl *
@@ -111,7 +110,6 @@
 Decl *
 TemplateDeclInstantiator::VisitNamespaceDecl(NamespaceDecl *D) {
   llvm_unreachable("Namespaces cannot be instantiated");
-  return D;
 }
 
 Decl *
@@ -702,7 +700,6 @@
 
 Decl *TemplateDeclInstantiator::VisitEnumConstantDecl(EnumConstantDecl *D) {
   llvm_unreachable("EnumConstantDecls can only occur within EnumDecls.");
-  return 0;
 }
 
 Decl *TemplateDeclInstantiator::VisitClassTemplateDecl(ClassTemplateDecl *D) {

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Fri Sep 23 15:26:49 2011
@@ -1760,7 +1760,7 @@
       if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static)
         break;
       switch (cast<TagDecl>(SemaRef.CurContext)->getTagKind()) {
-      case TTK_Enum: llvm_unreachable("unhandled tag kind"); break;
+      case TTK_Enum: llvm_unreachable("unhandled tag kind");
       case TTK_Struct: Error = 1; /* Struct member */ break;
       case TTK_Union:  Error = 2; /* Union member */ break;
       case TTK_Class:  Error = 3; /* Class member */ break;

Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Fri Sep 23 15:26:49 2011
@@ -1729,7 +1729,6 @@
 
     default:
       llvm_unreachable("Invalid C++ named cast");
-      break;
     }
 
     return ExprError();
@@ -2682,7 +2681,6 @@
   }
 
   llvm_unreachable("Unknown name kind.");
-  return DeclarationNameInfo();
 }
 
 template<typename Derived>
@@ -8050,7 +8048,6 @@
 ExprResult
 TreeTransform<Derived>::TransformAsTypeExpr(AsTypeExpr *E) {
   llvm_unreachable("Cannot transform asType expressions yet");
-  return SemaRef.Owned(E);
 }
   
 //===----------------------------------------------------------------------===//

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Sep 23 15:26:49 2011
@@ -4994,7 +4994,6 @@
   }
 
   llvm_unreachable("Unhandled template name kind!");
-  return TemplateName();
 }
 
 TemplateArgument
@@ -5034,7 +5033,6 @@
   }
 
   llvm_unreachable("Unhandled template argument kind!");
-  return TemplateArgument();
 }
 
 TemplateParameterList *

Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Fri Sep 23 15:26:49 2011
@@ -346,7 +346,6 @@
   FD->IdentifierNamespace = Record[Idx++];
   switch ((FunctionDecl::TemplatedKind)Record[Idx++]) {
   default: llvm_unreachable("Unhandled TemplatedKind!");
-    break;
   case FunctionDecl::TK_NonTemplate:
     break;
   case FunctionDecl::TK_FunctionTemplate:
@@ -1481,7 +1480,6 @@
   case DECL_CONTEXT_LEXICAL:
   case DECL_CONTEXT_VISIBLE:
     llvm_unreachable("Record cannot be de-serialized with ReadDeclRecord");
-    break;
   case DECL_TYPEDEF:
     D = TypedefDecl::Create(Context, 0, SourceLocation(), SourceLocation(),
                             0, 0);

Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterDecl.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Fri Sep 23 15:26:49 2011
@@ -296,7 +296,6 @@
   Record.push_back(D->getTemplatedKind());
   switch (D->getTemplatedKind()) {
   default: llvm_unreachable("Unhandled TemplatedKind!");
-    break;
   case FunctionDecl::TK_NonTemplate:
     break;
   case FunctionDecl::TK_FunctionTemplate:

Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Fri Sep 23 15:26:49 2011
@@ -1744,7 +1744,6 @@
     if (errorNode->isSink()) {
       llvm_unreachable(
            "BugType::isSuppressSink() should not be 'true' for sink end nodes");
-      return 0;
     }
     // No successors?  By definition this nodes isn't post-dominated by a sink.
     if (errorNode->succ_empty()) {

Modified: cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp Fri Sep 23 15:26:49 2011
@@ -327,7 +327,6 @@
     switch (Term->getStmtClass()) {
       default:
         llvm_unreachable("Analysis for this terminator not implemented.");
-        break;
 
       case Stmt::BinaryOperatorClass: // '&&' and '||'
         HandleBranch(cast<BinaryOperator>(Term)->getLHS(), Term, B, Pred);

Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Fri Sep 23 15:26:49 2011
@@ -1031,7 +1031,6 @@
     }
 
     llvm_unreachable("No block with label.");
-    return;
   }
 
   if (isa<loc::ConcreteInt>(V) || isa<UndefinedVal>(V)) {

Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp Fri Sep 23 15:26:49 2011
@@ -626,7 +626,6 @@
         switch (U->getOpcode()) {
           default:
             llvm_unreachable("Invalid Opcode.");
-            break;
             
           case UO_Not:
             // FIXME: Do we need to handle promotions?

Modified: cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp Fri Sep 23 15:26:49 2011
@@ -892,7 +892,6 @@
 
   if (isa<CodeTextRegion>(MR)) {
     llvm_unreachable("Why load from a code text region?");
-    return UnknownVal();
   }
 
   // FIXME: Perhaps this method should just take a 'const MemRegion*' argument

Modified: cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp Fri Sep 23 15:26:49 2011
@@ -370,6 +370,5 @@
     }
     default:
       llvm_unreachable("Pretty-printing not implemented for this Loc.");
-      break;
   }
 }

Modified: cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp Fri Sep 23 15:26:49 2011
@@ -348,7 +348,6 @@
         case BO_LAnd:
         case BO_LOr:
           llvm_unreachable("Logical operators handled by branching logic.");
-          return UnknownVal();
         case BO_Assign:
         case BO_MulAssign:
         case BO_DivAssign:
@@ -362,11 +361,9 @@
         case BO_OrAssign:
         case BO_Comma:
           llvm_unreachable("'=' and ',' operators handled by ExprEngine.");
-          return UnknownVal();
         case BO_PtrMemD:
         case BO_PtrMemI:
           llvm_unreachable("Pointer arithmetic not handled here.");
-          return UnknownVal();
         case BO_LT:
         case BO_GT:
         case BO_LE:
@@ -557,7 +554,6 @@
     switch (op) {
     default:
       llvm_unreachable("Unimplemented operation for two identical values");
-      return UnknownVal();
     case BO_Sub:
       return makeZeroVal(resultTy);
     case BO_EQ:
@@ -574,7 +570,6 @@
   switch (lhs.getSubKind()) {
   default:
     llvm_unreachable("Ordering not implemented for this Loc.");
-    return UnknownVal();
 
   case loc::GotoLabelKind:
     // The only thing we know about labels is that they're non-null.

Modified: cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp Fri Sep 23 15:26:49 2011
@@ -104,7 +104,6 @@
     case MemRegion::NonStaticGlobalSpaceRegionKind:
     case MemRegion::StaticGlobalSpaceRegionKind: {
       llvm_unreachable("Invalid region cast");
-      break;
     }
 
     case MemRegion::FunctionTextRegionKind:
@@ -204,7 +203,6 @@
   }
 
   llvm_unreachable("unreachable");
-  return 0;
 }
 
 
@@ -262,7 +260,6 @@
 
   default:
     llvm_unreachable("Unhandled Base.");
-    return Base;
   }
 
   // NOTE: We must have this check first because ObjCIvarDecl is a subclass

Modified: cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp Fri Sep 23 15:26:49 2011
@@ -29,7 +29,6 @@
   switch (Op) {
     default:
       llvm_unreachable("operator printing not implemented");
-      break;
     case BO_Mul: os << '*'  ; break;
     case BO_Div: os << '/'  ; break;
     case BO_Rem: os << '%'  ; break;

Modified: cfe/trunk/tools/libclang/CIndexDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexDiagnostic.cpp?rev=140407&r1=140406&r2=140407&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexDiagnostic.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexDiagnostic.cpp Fri Sep 23 15:26:49 2011
@@ -106,7 +106,7 @@
 
   /* Print warning/error/etc. */
   switch (Severity) {
-  case CXDiagnostic_Ignored: llvm_unreachable("impossible"); break;
+  case CXDiagnostic_Ignored: llvm_unreachable("impossible");
   case CXDiagnostic_Note: Out << "note: "; break;
   case CXDiagnostic_Warning: Out << "warning: "; break;
   case CXDiagnostic_Error: Out << "error: "; break;





More information about the cfe-commits mailing list