[cfe-commits] r84824 - /cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp

Zhongxing Xu xuzhongxing at gmail.com
Wed Oct 21 18:58:11 PDT 2009


Author: zhongxingxu
Date: Wed Oct 21 20:58:10 2009
New Revision: 84824

URL: http://llvm.org/viewvc/llvm-project?rev=84824&view=rev
Log:
Rename: CheckBadDiv->CheckDivZero.

Modified:
    cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp

Modified: cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp?rev=84824&r1=84823&r2=84824&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngineInternalChecks.cpp Wed Oct 21 20:58:10 2009
@@ -742,11 +742,11 @@
   }
 }
 
-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 @@
   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 @@
     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 @@
   registerCheck(new CheckAttrNonNull());
   registerCheck(new CheckUndefinedArg());
   registerCheck(new CheckBadCall());
-  registerCheck(new CheckBadDiv());
+  registerCheck(new CheckDivZero());
 }





More information about the cfe-commits mailing list