[cfe-commits] r48659 - in /cfe/trunk: include/clang/Analysis/PathSensitive/GRCoreEngine.h include/clang/Analysis/PathSensitive/GRExprEngine.h lib/Analysis/CFRefCount.cpp lib/Analysis/GRExprEngine.cpp lib/Analysis/GRSimpleVals.cpp

Ted Kremenek kremenek at apple.com
Fri Mar 21 14:30:15 PDT 2008


Author: kremenek
Date: Fri Mar 21 16:30:14 2008
New Revision: 48659

URL: http://llvm.org/viewvc/llvm-project?rev=48659&view=rev
Log:
Rename "Nodify" to "MakeNode"

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
    cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h
    cfe/trunk/lib/Analysis/CFRefCount.cpp
    cfe/trunk/lib/Analysis/GRExprEngine.cpp
    cfe/trunk/lib/Analysis/GRSimpleVals.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h?rev=48659&r1=48658&r2=48659&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRCoreEngine.h Fri Mar 21 16:30:14 2008
@@ -207,7 +207,7 @@
     CleanedState = St;
   }
   
-  NodeTy* Nodify(ExplodedNodeSet<StateTy>& Dst, Stmt* S,
+  NodeTy* MakeNode(ExplodedNodeSet<StateTy>& Dst, Stmt* S,
                  NodeTy* Pred, StateTy* St) {    
     
     StateTy* PredState = GetState(Pred);

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h?rev=48659&r1=48658&r2=48659&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h Fri Mar 21 16:30:14 2008
@@ -352,9 +352,9 @@
   ValueState* AssumeSymInt(ValueState* St, bool Assumption,
                            const SymIntConstraint& C, bool& isFeasible);
   
-  NodeTy* Nodify(NodeSet& Dst, Stmt* S, NodeTy* Pred, ValueState* St) {
+  NodeTy* MakeNode(NodeSet& Dst, Stmt* S, NodeTy* Pred, ValueState* St) {
     assert (Builder && "GRStmtNodeBuilder not present.");
-    return Builder->Nodify(Dst, S, Pred, St);
+    return Builder->MakeNode(Dst, S, Pred, St);
   }
   
   /// HandleUndefinedStore - Create the necessary sink node to represent

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

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Fri Mar 21 16:30:14 2008
@@ -597,7 +597,7 @@
       St = StateMgr.SetRVal(St, CE, X, Eng.getCFG().isBlkExpr(CE), false);
     }      
     
-    Builder.Nodify(Dst, CE, Pred, St);
+    Builder.MakeNode(Dst, CE, Pred, St);
     return;
   }
   
@@ -693,7 +693,7 @@
     }
   }
       
-  Builder.Nodify(Dst, CE, Pred, St);
+  Builder.MakeNode(Dst, CE, Pred, St);
 }
 
 

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

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Fri Mar 21 16:30:14 2008
@@ -364,7 +364,7 @@
     // Handle undefined values.
     
     if (X.isUndef()) {
-      Nodify(Dst, B, Pred, SetBlkExprRVal(St, B, X));
+      MakeNode(Dst, B, Pred, SetBlkExprRVal(St, B, X));
       return;
     }
     
@@ -379,13 +379,15 @@
     ValueState* NewState = Assume(St, X, true, isFeasible);
     
     if (isFeasible)
-      Nodify(Dst, B, Pred, SetBlkExprRVal(NewState, B, MakeConstantVal(1U, B)));
+      MakeNode(Dst, B, Pred,
+               SetBlkExprRVal(NewState, B, MakeConstantVal(1U, B)));
       
     isFeasible = false;
     NewState = Assume(St, X, false, isFeasible);
     
     if (isFeasible)
-      Nodify(Dst, B, Pred, SetBlkExprRVal(NewState, B, MakeConstantVal(0U, B)));
+      MakeNode(Dst, B, Pred,
+               SetBlkExprRVal(NewState, B, MakeConstantVal(0U, B)));
   }
   else {
     // We took the LHS expression.  Depending on whether we are '&&' or
@@ -393,7 +395,7 @@
     // the short-circuiting.
     
     X = MakeConstantVal( B->getOpcode() == BinaryOperator::LAnd ? 0U : 1U, B);
-    Nodify(Dst, B, Pred, SetBlkExprRVal(St, B, X));
+    MakeNode(Dst, B, Pred, SetBlkExprRVal(St, B, X));
   }
 }
  
@@ -443,7 +445,7 @@
   ValueState* St = GetState(Pred);  
   RVal X = RVal::MakeVal(BasicVals, D);
   RVal Y = isa<lval::DeclVal>(X) ? GetRVal(St, cast<lval::DeclVal>(X)) : X;
-  Nodify(Dst, D, Pred, SetBlkExprRVal(St, D, Y));
+  MakeNode(Dst, D, Pred, SetBlkExprRVal(St, D, Y));
 }
 
 void GRExprEngine::VisitCall(CallExpr* CE, NodeTy* Pred,
@@ -549,7 +551,7 @@
             // For __builtin_expect, just return the value of the subexpression.
             assert (CE->arg_begin() != CE->arg_end());            
             RVal X = GetRVal(St, *(CE->arg_begin()));
-            Nodify(Dst, CE, *DI, SetRVal(St, CE, X));
+            MakeNode(Dst, CE, *DI, SetRVal(St, CE, X));
             continue;            
           }
             
@@ -570,7 +572,7 @@
           St = SetRVal(St, cast<LVal>(V), UnknownVal());
       }
       
-      Nodify(Dst, CE, *DI, St);
+      MakeNode(Dst, CE, *DI, St);
     }
     else {
 
@@ -604,7 +606,7 @@
       EvalCall(Dst, CE, cast<LVal>(L), *DI);
       
       if (!Builder->BuildSinks && Dst.size() == size)
-        Nodify(Dst, CE, *DI, St);
+        MakeNode(Dst, CE, *DI, St);
     }
   }
 }
@@ -636,7 +638,7 @@
     
     RVal V = T->isReferenceType() ? GetLVal(St, Ex) : GetRVal(St, Ex);
     
-    Nodify(Dst, CastE, N, SetRVal(St, CastE, EvalCast(V, CastE->getType())));
+    MakeNode(Dst, CastE, N, SetRVal(St, CastE, EvalCast(V, CastE->getType())));
   }
 }
 
@@ -705,7 +707,7 @@
       }
     }
 
-  Nodify(Dst, DS, Pred, St);
+  MakeNode(Dst, DS, Pred, St);
 }
 
 
@@ -726,7 +728,7 @@
   X = GetBlkExprRVal(St, SE);
   
   // Make sure that we invalidate the previous binding.
-  Nodify(Dst, Ex, Pred, StateMgr.SetRVal(St, Ex, X, true, true));
+  MakeNode(Dst, Ex, Pred, StateMgr.SetRVal(St, Ex, X, true, true));
 }
 
 /// VisitSizeOfAlignOfTypeExpr - Transfer function for sizeof(type).
@@ -752,7 +754,7 @@
   else  // Get alignment of the type.
     amt = getContext().getTypeAlign(T) / 8;
   
-  Nodify(Dst, Ex, Pred,
+  MakeNode(Dst, Ex, Pred,
          SetRVal(GetState(Pred), Ex,
                  NonLVal::MakeVal(BasicVals, amt, Ex->getType())));  
 }
@@ -814,13 +816,13 @@
     
     if (isFeasibleNotNull) {
 
-      if (GetLVal) Nodify(Dst, U, N, SetRVal(StNotNull, U, LV));
+      if (GetLVal) MakeNode(Dst, U, N, SetRVal(StNotNull, U, LV));
       else {
         
         // FIXME: Currently symbolic analysis "generates" new symbols
         //  for the contents of values.  We need a better approach.
       
-        Nodify(Dst, U, N, SetRVal(StNotNull, U,
+        MakeNode(Dst, U, N, SetRVal(StNotNull, U,
                                   GetRVal(StNotNull, LV, U->getType())));
       }
     }
@@ -833,7 +835,7 @@
     
     if (isFeasibleNull) {
       
-      // We don't use "Nodify" here because the node will be a sink
+      // We don't use "MakeNode" here because the node will be a sink
       // and we have no intention of processing it later.
 
       NodeTy* NullNode = Builder->generateNode(U, StNull, N);
@@ -890,7 +892,7 @@
     }
 
     if (SubV.isUndef()) {
-      Nodify(Dst, U, N1, SetRVal(St, U, SubV));
+      MakeNode(Dst, U, N1, SetRVal(St, U, SubV));
       continue;
     }
     
@@ -908,7 +910,7 @@
 
       // Propagate undefined values.      
       if (V.isUndef()) {
-        Nodify(Dst, U, N1, SetRVal(St, U, V));
+        MakeNode(Dst, U, N1, SetRVal(St, U, V));
         continue;
       }
       
@@ -924,7 +926,7 @@
       else
         St = SetRVal(SetRVal(St, U, Result), SubLV, Result);
         
-      Nodify(Dst, U, N1, St);
+      MakeNode(Dst, U, N1, St);
       continue;
     }    
     
@@ -975,7 +977,7 @@
         assert (false && "Not implemented.");
     } 
     
-    Nodify(Dst, U, N1, St);
+    MakeNode(Dst, U, N1, St);
   }
 }
 
@@ -992,7 +994,7 @@
   ValueState* St = GetState(Pred);
   St = SetRVal(St, U, NonLVal::MakeVal(BasicVals, size, U->getType()));
 
-  Nodify(Dst, U, Pred, St);
+  MakeNode(Dst, U, Pred, St);
 }
 
 void GRExprEngine::VisitLVal(Expr* Ex, NodeTy* Pred, NodeSet& Dst) {
@@ -1066,7 +1068,7 @@
         St = SetRVal(St, cast<LVal>(X), UnknownVal());
     }
     
-    Nodify(Dst, A, Pred, St);
+    MakeNode(Dst, A, Pred, St);
     return;
   }
   
@@ -1193,7 +1195,7 @@
           continue;
         }
         
-        Nodify(Dst, B, N2, SetRVal(St, B, Result));
+        MakeNode(Dst, B, N2, SetRVal(St, B, Result));
         continue;
       }
         
@@ -1383,7 +1385,7 @@
         }
       }
     
-      Nodify(Dst, B, N2, St);
+      MakeNode(Dst, B, N2, St);
     }
   }
 }
@@ -1427,7 +1429,7 @@
       }
       else if (B->getOpcode() == BinaryOperator::Comma) {
         ValueState* St = GetState(Pred);
-        Nodify(Dst, B, Pred, SetRVal(St, B, GetRVal(St, B->getRHS())));
+        MakeNode(Dst, B, Pred, SetRVal(St, B, GetRVal(St, B->getRHS())));
         break;
       }
       
@@ -1498,7 +1500,7 @@
       assert (!SE->getSubStmt()->body_empty());
 
       if (Expr* LastExpr = dyn_cast<Expr>(*SE->getSubStmt()->body_rbegin()))
-        Nodify(Dst, SE, Pred, SetRVal(St, SE, GetRVal(St, LastExpr)));
+        MakeNode(Dst, SE, Pred, SetRVal(St, SE, GetRVal(St, LastExpr)));
       else
         Dst.Add(Pred);
       

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

==============================================================================
--- cfe/trunk/lib/Analysis/GRSimpleVals.cpp (original)
+++ cfe/trunk/lib/Analysis/GRSimpleVals.cpp Fri Mar 21 16:30:14 2008
@@ -458,5 +458,5 @@
     St = StateMgr.SetRVal(St, CE, X, Eng.getCFG().isBlkExpr(CE), false);
   }  
     
-  Builder.Nodify(Dst, CE, Pred, St);
+  Builder.MakeNode(Dst, CE, Pred, St);
 }





More information about the cfe-commits mailing list