diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-23 05:06:16 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-23 05:06:16 +0000 |
commit | b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 (patch) | |
tree | 2b708dc00bedcc6a6204d29c915ac7fce8fb028f /lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | |
parent | c535d9730e11ca335790359bfbd4600be71c5410 (diff) |
Switch assert(0/false) llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp b/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp index 787aa055e6..830d70e888 100644 --- a/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ b/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -171,7 +171,7 @@ SVal SimpleSValBuilder::evalComplement(NonLoc X) { static BinaryOperator::Opcode NegateComparison(BinaryOperator::Opcode op) { switch (op) { default: - assert(false && "Invalid opcode."); + llvm_unreachable("Invalid opcode."); case BO_LT: return BO_GE; case BO_GT: return BO_LE; case BO_LE: return BO_GT; @@ -184,7 +184,7 @@ static BinaryOperator::Opcode NegateComparison(BinaryOperator::Opcode op) { static BinaryOperator::Opcode ReverseComparison(BinaryOperator::Opcode op) { switch (op) { default: - assert(false && "Invalid opcode."); + llvm_unreachable("Invalid opcode."); case BO_LT: return BO_GT; case BO_GT: return BO_LT; case BO_LE: return BO_GE; @@ -347,7 +347,7 @@ SVal SimpleSValBuilder::evalBinOpNN(const ProgramState *state, break; case BO_LAnd: case BO_LOr: - assert(false && "Logical operators handled by branching logic."); + llvm_unreachable("Logical operators handled by branching logic."); return UnknownVal(); case BO_Assign: case BO_MulAssign: @@ -361,11 +361,11 @@ SVal SimpleSValBuilder::evalBinOpNN(const ProgramState *state, case BO_XorAssign: case BO_OrAssign: case BO_Comma: - assert(false && "'=' and ',' operators handled by ExprEngine."); + llvm_unreachable("'=' and ',' operators handled by ExprEngine."); return UnknownVal(); case BO_PtrMemD: case BO_PtrMemI: - assert(false && "Pointer arithmetic not handled here."); + llvm_unreachable("Pointer arithmetic not handled here."); return UnknownVal(); case BO_LT: case BO_GT: @@ -556,7 +556,7 @@ SVal SimpleSValBuilder::evalBinOpLL(const ProgramState *state, if (lhs == rhs) { switch (op) { default: - assert(false && "Unimplemented operation for two identical values"); + llvm_unreachable("Unimplemented operation for two identical values"); return UnknownVal(); case BO_Sub: return makeZeroVal(resultTy); @@ -573,7 +573,7 @@ SVal SimpleSValBuilder::evalBinOpLL(const ProgramState *state, switch (lhs.getSubKind()) { default: - assert(false && "Ordering not implemented for this Loc."); + llvm_unreachable("Ordering not implemented for this Loc."); return UnknownVal(); case loc::GotoLabelKind: @@ -827,7 +827,7 @@ SVal SimpleSValBuilder::evalBinOpLL(const ProgramState *state, return makeTruthVal(!leftFirst, resultTy); } - assert(false && "Fields not found in parent record's definition"); + llvm_unreachable("Fields not found in parent record's definition"); } // If we get here, we have no way of comparing the regions. |