diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-23 20:26:49 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-23 20:26:49 +0000 |
commit | eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 (patch) | |
tree | 933295d0f71ec58a77f55d5e1046ec5efc861253 /lib/StaticAnalyzer/Core | |
parent | c193dd84414c32b7c66f5b68176401665c0d2301 (diff) |
Removing a bunch of dead returns/breaks after llvm_unreachables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporter.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/CoreEngine.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngineC.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/RegionStore.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/SVals.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 5 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/Store.cpp | 3 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/SymbolManager.cpp | 1 |
9 files changed, 0 insertions, 15 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index b87c9eba18..6e73b60abf 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -1744,7 +1744,6 @@ FindReportInEquivalenceClass(BugReportEquivClass& EQ, 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()) { diff --git a/lib/StaticAnalyzer/Core/CoreEngine.cpp b/lib/StaticAnalyzer/Core/CoreEngine.cpp index 6a860428d6..e1705c61a3 100644 --- a/lib/StaticAnalyzer/Core/CoreEngine.cpp +++ b/lib/StaticAnalyzer/Core/CoreEngine.cpp @@ -327,7 +327,6 @@ void CoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode *Pred) { 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); diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 5e38f2f244..d982a698d3 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1031,7 +1031,6 @@ void ExprEngine::processIndirectGoto(IndirectGotoNodeBuilder &builder) { } llvm_unreachable("No block with label."); - return; } if (isa<loc::ConcreteInt>(V) || isa<UndefinedVal>(V)) { diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 955684f92d..68ccc59ac9 100644 --- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -626,7 +626,6 @@ void ExprEngine::VisitUnaryOperator(const UnaryOperator* U, switch (U->getOpcode()) { default: llvm_unreachable("Invalid Opcode."); - break; case UO_Not: // FIXME: Do we need to handle promotions? diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index 18fbf831ec..6d435da993 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -892,7 +892,6 @@ SVal RegionStoreManager::Retrieve(Store store, Loc L, QualType T) { 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 diff --git a/lib/StaticAnalyzer/Core/SVals.cpp b/lib/StaticAnalyzer/Core/SVals.cpp index e32a3b0f53..b5980b9693 100644 --- a/lib/StaticAnalyzer/Core/SVals.cpp +++ b/lib/StaticAnalyzer/Core/SVals.cpp @@ -370,6 +370,5 @@ void Loc::dumpToStream(raw_ostream &os) const { } default: llvm_unreachable("Pretty-printing not implemented for this Loc."); - break; } } diff --git a/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp b/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp index 830d70e888..bd63ecf775 100644 --- a/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ b/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -348,7 +348,6 @@ SVal SimpleSValBuilder::evalBinOpNN(const ProgramState *state, 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 @@ SVal SimpleSValBuilder::evalBinOpNN(const ProgramState *state, 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 @@ SVal SimpleSValBuilder::evalBinOpLL(const ProgramState *state, 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 @@ SVal SimpleSValBuilder::evalBinOpLL(const ProgramState *state, 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. diff --git a/lib/StaticAnalyzer/Core/Store.cpp b/lib/StaticAnalyzer/Core/Store.cpp index 63550d47f1..48a6f4f60f 100644 --- a/lib/StaticAnalyzer/Core/Store.cpp +++ b/lib/StaticAnalyzer/Core/Store.cpp @@ -104,7 +104,6 @@ const MemRegion *StoreManager::castRegion(const MemRegion *R, QualType CastToTy) case MemRegion::NonStaticGlobalSpaceRegionKind: case MemRegion::StaticGlobalSpaceRegionKind: { llvm_unreachable("Invalid region cast"); - break; } case MemRegion::FunctionTextRegionKind: @@ -204,7 +203,6 @@ const MemRegion *StoreManager::castRegion(const MemRegion *R, QualType CastToTy) } llvm_unreachable("unreachable"); - return 0; } @@ -262,7 +260,6 @@ SVal StoreManager::getLValueFieldOrIvar(const Decl *D, SVal Base) { default: llvm_unreachable("Unhandled Base."); - return Base; } // NOTE: We must have this check first because ObjCIvarDecl is a subclass diff --git a/lib/StaticAnalyzer/Core/SymbolManager.cpp b/lib/StaticAnalyzer/Core/SymbolManager.cpp index 32ad5819de..dc3a2fe660 100644 --- a/lib/StaticAnalyzer/Core/SymbolManager.cpp +++ b/lib/StaticAnalyzer/Core/SymbolManager.cpp @@ -29,7 +29,6 @@ static void print(raw_ostream &os, BinaryOperator::Opcode Op) { 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; |