summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-10-22 01:58:10 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-10-22 01:58:10 +0000
commit4611aee0ac2d0874e587fe86ce2b60dc6bb38313 (patch)
treef090dc9fb819b07024e50ce6f11b3f38d1444ded /clang/lib/Analysis/GRExprEngineInternalChecks.cpp
parentc9f1efe6b3f34827fc8cc8c9a6f0840e53e17c52 (diff)
downloadbcm5719-llvm-4611aee0ac2d0874e587fe86ce2b60dc6bb38313.tar.gz
bcm5719-llvm-4611aee0ac2d0874e587fe86ce2b60dc6bb38313.zip
Rename: CheckBadDiv->CheckDivZero.
llvm-svn: 84824
Diffstat (limited to 'clang/lib/Analysis/GRExprEngineInternalChecks.cpp')
-rw-r--r--clang/lib/Analysis/GRExprEngineInternalChecks.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
index cc1ec4b77e4..da24192c9d5 100644
--- a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
+++ b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp
@@ -742,11 +742,11 @@ void CheckBadCall::PreVisitCallExpr(CheckerContext &C, const CallExpr *CE) {
}
}
-class VISIBILITY_HIDDEN CheckBadDiv : public CheckerVisitor<CheckBadDiv> {
+class VISIBILITY_HIDDEN CheckDivZero : public CheckerVisitor<CheckDivZero> {
DivZero *BT;
public:
- CheckBadDiv() : BT(0) {}
- ~CheckBadDiv() {}
+ CheckDivZero() : BT(0) {}
+ ~CheckDivZero() {}
const void *getTag() {
static int x;
@@ -756,8 +756,8 @@ public:
void PreVisitBinaryOperator(CheckerContext &C, const BinaryOperator *B);
};
-void CheckBadDiv::PreVisitBinaryOperator(CheckerContext &C,
- const BinaryOperator *B) {
+void CheckDivZero::PreVisitBinaryOperator(CheckerContext &C,
+ const BinaryOperator *B) {
BinaryOperator::Opcode Op = B->getOpcode();
if (Op != BinaryOperator::Div &&
Op != BinaryOperator::Rem &&
@@ -792,7 +792,8 @@ void CheckBadDiv::PreVisitBinaryOperator(CheckerContext &C,
return;
}
- // If we get here, then the denom should not be zero.
+ // If we get here, then the denom should not be zero. We abandon the implicit
+ // zero denom case for now.
if (stateNotZero != C.getState())
C.addTransition(C.GenerateNode(B, stateNotZero));
}
@@ -828,5 +829,5 @@ void GRExprEngine::RegisterInternalChecks() {
registerCheck(new CheckAttrNonNull());
registerCheck(new CheckUndefinedArg());
registerCheck(new CheckBadCall());
- registerCheck(new CheckBadDiv());
+ registerCheck(new CheckDivZero());
}
OpenPOWER on IntegriCloud