[cfe-commits] r120614 - in /cfe/trunk: include/clang/Checker/PathSensitive/ lib/Checker/

Ted Kremenek kremenek at apple.com
Wed Dec 1 14:16:56 PST 2010


Author: kremenek
Date: Wed Dec  1 16:16:56 2010
New Revision: 120614

URL: http://llvm.org/viewvc/llvm-project?rev=120614&view=rev
Log:
Rename all 'AssumeXXX' methods in libChecker
to 'assumeXXX'.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/ConstraintManager.h
    cfe/trunk/include/clang/Checker/PathSensitive/GRState.h
    cfe/trunk/lib/Checker/ArrayBoundChecker.cpp
    cfe/trunk/lib/Checker/AttrNonNullChecker.cpp
    cfe/trunk/lib/Checker/BasicConstraintManager.cpp
    cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp
    cfe/trunk/lib/Checker/BugReporterVisitors.cpp
    cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp
    cfe/trunk/lib/Checker/CFRefCount.cpp
    cfe/trunk/lib/Checker/CStringChecker.cpp
    cfe/trunk/lib/Checker/DereferenceChecker.cpp
    cfe/trunk/lib/Checker/DivZeroChecker.cpp
    cfe/trunk/lib/Checker/GRExprEngine.cpp
    cfe/trunk/lib/Checker/GRState.cpp
    cfe/trunk/lib/Checker/MallocChecker.cpp
    cfe/trunk/lib/Checker/OSAtomicChecker.cpp
    cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp
    cfe/trunk/lib/Checker/PthreadLockChecker.cpp
    cfe/trunk/lib/Checker/RangeConstraintManager.cpp
    cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp
    cfe/trunk/lib/Checker/SimpleConstraintManager.cpp
    cfe/trunk/lib/Checker/SimpleConstraintManager.h
    cfe/trunk/lib/Checker/StreamChecker.cpp
    cfe/trunk/lib/Checker/UnixAPIChecker.cpp
    cfe/trunk/lib/Checker/VLASizeChecker.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/ConstraintManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/ConstraintManager.h?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/ConstraintManager.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/ConstraintManager.h Wed Dec  1 16:16:56 2010
@@ -31,13 +31,13 @@
 class ConstraintManager {
 public:
   virtual ~ConstraintManager();
-  virtual const GRState *Assume(const GRState *state, DefinedSVal Cond,
+  virtual const GRState *assume(const GRState *state, DefinedSVal Cond,
                                 bool Assumption) = 0;
 
-  std::pair<const GRState*, const GRState*> AssumeDual(const GRState *state,
+  std::pair<const GRState*, const GRState*> assumeDual(const GRState *state,
                                                        DefinedSVal Cond) {
-    return std::make_pair(Assume(state, Cond, true),
-                          Assume(state, Cond, false));
+    return std::make_pair(assume(state, Cond, true),
+                          assume(state, Cond, false));
   }
 
   virtual const llvm::APSInt* getSymVal(const GRState *state,

Modified: cfe/trunk/include/clang/Checker/PathSensitive/GRState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/GRState.h?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/GRState.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/GRState.h Wed Dec  1 16:16:56 2010
@@ -156,30 +156,30 @@
   // could satisfy all the constraints).  This is the principal mechanism
   // for modeling path-sensitivity in GRExprEngine/GRState.
   //
-  // Various "Assume" methods form the interface for adding constraints to
-  // symbolic values.  A call to "Assume" indicates an assumption being placed
-  // on one or symbolic values.  Assume methods take the following inputs:
+  // Various "assume" methods form the interface for adding constraints to
+  // symbolic values.  A call to 'assume' indicates an assumption being placed
+  // on one or symbolic values.  'assume' methods take the following inputs:
   //
   //  (1) A GRState object representing the current state.
   //
-  //  (2) The assumed constraint (which is specific to a given "Assume" method).
+  //  (2) The assumed constraint (which is specific to a given "assume" method).
   //
   //  (3) A binary value "Assumption" that indicates whether the constraint is
   //      assumed to be true or false.
   //
-  // The output of "Assume*" is a new GRState object with the added constraints.
+  // The output of "assume*" is a new GRState object with the added constraints.
   // If no new state is feasible, NULL is returned.
   //
 
-  const GRState *Assume(DefinedOrUnknownSVal cond, bool assumption) const;
+  const GRState *assume(DefinedOrUnknownSVal cond, bool assumption) const;
 
   /// This method assumes both "true" and "false" for 'cond', and
   ///  returns both corresponding states.  It's shorthand for doing
-  ///  'Assume' twice.
+  ///  'assume' twice.
   std::pair<const GRState*, const GRState*>
-  Assume(DefinedOrUnknownSVal cond) const;
+  assume(DefinedOrUnknownSVal cond) const;
 
-  const GRState *AssumeInBound(DefinedOrUnknownSVal idx,
+  const GRState *assumeInBound(DefinedOrUnknownSVal idx,
                                DefinedOrUnknownSVal upperBound,
                                bool assumption) const;
 
@@ -603,21 +603,21 @@
   return getStateManager().getRegionManager().getVarRegion(D, LC);
 }
 
-inline const GRState *GRState::Assume(DefinedOrUnknownSVal Cond,
+inline const GRState *GRState::assume(DefinedOrUnknownSVal Cond,
                                       bool Assumption) const {
   if (Cond.isUnknown())
     return this;
   
-  return getStateManager().ConstraintMgr->Assume(this, cast<DefinedSVal>(Cond),
+  return getStateManager().ConstraintMgr->assume(this, cast<DefinedSVal>(Cond),
                                                  Assumption);
 }
   
 inline std::pair<const GRState*, const GRState*>
-GRState::Assume(DefinedOrUnknownSVal Cond) const {
+GRState::assume(DefinedOrUnknownSVal Cond) const {
   if (Cond.isUnknown())
     return std::make_pair(this, this);
   
-  return getStateManager().ConstraintMgr->AssumeDual(this,
+  return getStateManager().ConstraintMgr->assumeDual(this,
                                                      cast<DefinedSVal>(Cond));
 }
 

Modified: cfe/trunk/lib/Checker/ArrayBoundChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ArrayBoundChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ArrayBoundChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ArrayBoundChecker.cpp Wed Dec  1 16:16:56 2010
@@ -63,8 +63,8 @@
     = C.getStoreManager().getSizeInElements(state, ER->getSuperRegion(), 
                                             ER->getValueType());
 
-  const GRState *StInBound = state->AssumeInBound(Idx, NumElements, true);
-  const GRState *StOutBound = state->AssumeInBound(Idx, NumElements, false);
+  const GRState *StInBound = state->assumeInBound(Idx, NumElements, true);
+  const GRState *StOutBound = state->assumeInBound(Idx, NumElements, false);
   if (StOutBound && !StInBound) {
     ExplodedNode *N = C.GenerateSink(StOutBound);
     if (!N)

Modified: cfe/trunk/lib/Checker/AttrNonNullChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/AttrNonNullChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/AttrNonNullChecker.cpp (original)
+++ cfe/trunk/lib/Checker/AttrNonNullChecker.cpp Wed Dec  1 16:16:56 2010
@@ -91,7 +91,7 @@
 
     ConstraintManager &CM = C.getConstraintManager();
     const GRState *stateNotNull, *stateNull;
-    llvm::tie(stateNotNull, stateNull) = CM.AssumeDual(state, *DV);
+    llvm::tie(stateNotNull, stateNull) = CM.assumeDual(state, *DV);
 
     if (stateNull && !stateNotNull) {
       // Generate an error node.  Check for a null node in case

Modified: cfe/trunk/lib/Checker/BasicConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BasicConstraintManager.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BasicConstraintManager.cpp (original)
+++ cfe/trunk/lib/Checker/BasicConstraintManager.cpp Wed Dec  1 16:16:56 2010
@@ -53,27 +53,27 @@
     : SimpleConstraintManager(subengine), 
       ISetFactory(statemgr.getAllocator()) {}
 
-  const GRState* AssumeSymNE(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymNE(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& V,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymEQ(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymEQ(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& V,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymLT(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymLT(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& V,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymGT(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymGT(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& V,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymGE(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymGE(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& V,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymLE(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymLE(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& V,
                              const llvm::APSInt& Adjustment);
 
@@ -102,7 +102,7 @@
 
 
 const GRState*
-BasicConstraintManager::AssumeSymNE(const GRState *state, SymbolRef sym,
+BasicConstraintManager::assumeSymNE(const GRState *state, SymbolRef sym,
                                     const llvm::APSInt &V,
                                     const llvm::APSInt &Adjustment) {
   // First, determine if sym == X, where X+Adjustment != V.
@@ -122,7 +122,7 @@
 }
 
 const GRState*
-BasicConstraintManager::AssumeSymEQ(const GRState *state, SymbolRef sym,
+BasicConstraintManager::assumeSymEQ(const GRState *state, SymbolRef sym,
                                     const llvm::APSInt &V,
                                     const llvm::APSInt &Adjustment) {
   // First, determine if sym == X, where X+Adjustment != V.
@@ -143,7 +143,7 @@
 
 // The logic for these will be handled in another ConstraintManager.
 const GRState*
-BasicConstraintManager::AssumeSymLT(const GRState *state, SymbolRef sym,
+BasicConstraintManager::assumeSymLT(const GRState *state, SymbolRef sym,
                                     const llvm::APSInt &V,
                                     const llvm::APSInt &Adjustment) {
   // Is 'V' the smallest possible value?
@@ -153,11 +153,11 @@
   }
 
   // FIXME: For now have assuming x < y be the same as assuming sym != V;
-  return AssumeSymNE(state, sym, V, Adjustment);
+  return assumeSymNE(state, sym, V, Adjustment);
 }
 
 const GRState*
-BasicConstraintManager::AssumeSymGT(const GRState *state, SymbolRef sym,
+BasicConstraintManager::assumeSymGT(const GRState *state, SymbolRef sym,
                                     const llvm::APSInt &V,
                                     const llvm::APSInt &Adjustment) {
   // Is 'V' the largest possible value?
@@ -167,11 +167,11 @@
   }
 
   // FIXME: For now have assuming x > y be the same as assuming sym != V;
-  return AssumeSymNE(state, sym, V, Adjustment);
+  return assumeSymNE(state, sym, V, Adjustment);
 }
 
 const GRState*
-BasicConstraintManager::AssumeSymGE(const GRState *state, SymbolRef sym,
+BasicConstraintManager::assumeSymGE(const GRState *state, SymbolRef sym,
                                     const llvm::APSInt &V,
                                     const llvm::APSInt &Adjustment) {
   // Reject a path if the value of sym is a constant X and !(X+Adj >= V).
@@ -199,7 +199,7 @@
 }
 
 const GRState*
-BasicConstraintManager::AssumeSymLE(const GRState *state, SymbolRef sym,
+BasicConstraintManager::assumeSymLE(const GRState *state, SymbolRef sym,
                                     const llvm::APSInt &V,
                                     const llvm::APSInt &Adjustment) {
   // Reject a path if the value of sym is a constant X and !(X+Adj <= V).

Modified: cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/Checker/BasicObjCFoundationChecks.cpp Wed Dec  1 16:16:56 2010
@@ -418,7 +418,7 @@
 
   // Are they equal?
   const GRState *stateTrue, *stateFalse;
-  llvm::tie(stateTrue, stateFalse) = state->Assume(ArgIsNull);
+  llvm::tie(stateTrue, stateFalse) = state->assume(ArgIsNull);
 
   if (stateTrue && !stateFalse) {
     ExplodedNode *N = C.GenerateSink(stateTrue);

Modified: cfe/trunk/lib/Checker/BugReporterVisitors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BugReporterVisitors.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BugReporterVisitors.cpp (original)
+++ cfe/trunk/lib/Checker/BugReporterVisitors.cpp Wed Dec  1 16:16:56 2010
@@ -252,14 +252,14 @@
 
     // Check if in the previous state it was feasible for this constraint
     // to *not* be true.
-    if (PrevN->getState()->Assume(Constraint, !Assumption)) {
+    if (PrevN->getState()->assume(Constraint, !Assumption)) {
 
       isSatisfied = true;
 
       // As a sanity check, make sure that the negation of the constraint
       // was infeasible in the current state.  If it is feasible, we somehow
       // missed the transition point.
-      if (N->getState()->Assume(Constraint, !Assumption))
+      if (N->getState()->assume(Constraint, !Assumption))
         return NULL;
 
       // We found the transition point for the constraint.  We now need to
@@ -400,7 +400,7 @@
     const DefinedOrUnknownSVal *DV = dyn_cast<DefinedOrUnknownSVal>(&V);
     if (!DV)
       return 0;
-    state = state->Assume(*DV, true);
+    state = state->assume(*DV, true);
     if (state)
       return 0;
 

Modified: cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp (original)
+++ cfe/trunk/lib/Checker/BuiltinFunctionChecker.cpp Wed Dec  1 16:16:56 2010
@@ -73,7 +73,7 @@
     SValBuilder& svalBuilder = ValMgr.getSValBuilder();
     DefinedOrUnknownSVal ExtentMatchesSizeArg =
       svalBuilder.evalEQ(state, Extent, Size);
-    state = state->Assume(ExtentMatchesSizeArg, true);
+    state = state->assume(ExtentMatchesSizeArg, true);
 
     C.GenerateNode(state->BindExpr(CE, loc::MemRegionVal(R)));
     return true;

Modified: cfe/trunk/lib/Checker/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CFRefCount.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Checker/CFRefCount.cpp Wed Dec  1 16:16:56 2010
@@ -1283,7 +1283,7 @@
 
   // Look for methods that return an owned object.
   if (cocoa::isCocoaObjectRef(RetTy)) {
-    // EXPERIMENTAL: Assume the Cocoa conventions for all objects returned
+    // EXPERIMENTAL: assume the Cocoa conventions for all objects returned
     //  by instance methods.
     RetEffect E = cocoa::followsFundamentalRule(S)
                   ? ObjCAllocRetE : RetEffect::MakeNotOwned(RetEffect::ObjC);
@@ -2725,7 +2725,7 @@
 #if 0
       if (RE.getKind() == RetEffect::OwnedAllocatedSymbol) {
         bool isFeasible;
-        state = state.Assume(loc::SymbolVal(Sym), true, isFeasible);
+        state = state.assume(loc::SymbolVal(Sym), true, isFeasible);
         assert(isFeasible && "Cannot assume fresh symbol is non-null.");
       }
 #endif

Modified: cfe/trunk/lib/Checker/CStringChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CStringChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CStringChecker.cpp (original)
+++ cfe/trunk/lib/Checker/CStringChecker.cpp Wed Dec  1 16:16:56 2010
@@ -59,7 +59,7 @@
 
   // Utility methods
   std::pair<const GRState*, const GRState*>
-  AssumeZero(CheckerContext &C, const GRState *state, SVal V, QualType Ty);
+  assumeZero(CheckerContext &C, const GRState *state, SVal V, QualType Ty);
 
   const GRState *SetCStringLength(const GRState *state, const MemRegion *MR,
                                   SVal StrLen);
@@ -115,7 +115,7 @@
 //===----------------------------------------------------------------------===//
 
 std::pair<const GRState*, const GRState*>
-CStringChecker::AssumeZero(CheckerContext &C, const GRState *state, SVal V,
+CStringChecker::assumeZero(CheckerContext &C, const GRState *state, SVal V,
                            QualType Ty) {
   DefinedSVal *Val = dyn_cast<DefinedSVal>(&V);
   if (!Val)
@@ -127,7 +127,7 @@
   DefinedOrUnknownSVal Zero = ValMgr.makeZeroVal(Ty);
   DefinedOrUnknownSVal ValIsZero = SV.evalEQ(state, *Val, Zero);
 
-  return state->Assume(ValIsZero);
+  return state->assume(ValIsZero);
 }
 
 const GRState *CStringChecker::CheckNonNull(CheckerContext &C,
@@ -138,7 +138,7 @@
     return NULL;
 
   const GRState *stateNull, *stateNonNull;
-  llvm::tie(stateNull, stateNonNull) = AssumeZero(C, state, l, S->getType());
+  llvm::tie(stateNull, stateNonNull) = assumeZero(C, state, l, S->getType());
 
   if (stateNull && !stateNonNull) {
     ExplodedNode *N = C.GenerateSink(stateNull);
@@ -195,8 +195,8 @@
   // Get the index of the accessed element.
   DefinedOrUnknownSVal Idx = cast<DefinedOrUnknownSVal>(ER->getIndex());
 
-  const GRState *StInBound = state->AssumeInBound(Idx, Size, true);
-  const GRState *StOutBound = state->AssumeInBound(Idx, Size, false);
+  const GRState *StInBound = state->assumeInBound(Idx, Size, true);
+  const GRState *StOutBound = state->assumeInBound(Idx, Size, false);
   if (StOutBound && !StInBound) {
     ExplodedNode *N = C.GenerateSink(StOutBound);
     if (!N)
@@ -331,7 +331,7 @@
 
   // Are the two values the same?
   DefinedOrUnknownSVal EqualTest = SV.evalEQ(state, *FirstLoc, *SecondLoc);
-  llvm::tie(stateTrue, stateFalse) = state->Assume(EqualTest);
+  llvm::tie(stateTrue, stateFalse) = state->assume(EqualTest);
 
   if (stateTrue && !stateFalse) {
     // If the values are known to be equal, that's automatically an overlap.
@@ -339,7 +339,7 @@
     return NULL;
   }
 
-  // Assume the two expressions are not equal.
+  // assume the two expressions are not equal.
   assert(stateFalse);
   state = stateFalse;
 
@@ -351,7 +351,7 @@
   if (!ReverseTest)
     return state;
 
-  llvm::tie(stateTrue, stateFalse) = state->Assume(*ReverseTest);
+  llvm::tie(stateTrue, stateFalse) = state->assume(*ReverseTest);
 
   if (stateTrue) {
     if (stateFalse) {
@@ -398,7 +398,7 @@
   if (!OverlapTest)
     return state;
 
-  llvm::tie(stateTrue, stateFalse) = state->Assume(*OverlapTest);
+  llvm::tie(stateTrue, stateFalse) = state->assume(*OverlapTest);
 
   if (stateTrue && !stateFalse) {
     // Overlap!
@@ -406,7 +406,7 @@
     return NULL;
   }
 
-  // Assume the two expressions don't overlap.
+  // assume the two expressions don't overlap.
   assert(stateFalse);
   return stateFalse;
 }
@@ -658,7 +658,7 @@
   QualType SizeTy = Size->getType();
 
   const GRState *StZeroSize, *StNonZeroSize;
-  llvm::tie(StZeroSize, StNonZeroSize) = AssumeZero(C, state, SizeVal, SizeTy);
+  llvm::tie(StZeroSize, StNonZeroSize) = assumeZero(C, state, SizeVal, SizeTy);
 
   // If the size is zero, there won't be any actual memory access.
   if (StZeroSize)
@@ -723,7 +723,7 @@
   QualType SizeTy = Size->getType();
 
   const GRState *StZeroSize, *StNonZeroSize;
-  llvm::tie(StZeroSize, StNonZeroSize) = AssumeZero(C, state, SizeVal, SizeTy);
+  llvm::tie(StZeroSize, StNonZeroSize) = assumeZero(C, state, SizeVal, SizeTy);
 
   // If the size can be zero, the result will be 0 in that case, and we don't
   // have to check either of the buffers.
@@ -746,7 +746,7 @@
     // See if they are the same.
     DefinedOrUnknownSVal SameBuf = SV.evalEQ(state, LV, RV);
     const GRState *StSameBuf, *StNotSameBuf;
-    llvm::tie(StSameBuf, StNotSameBuf) = state->Assume(SameBuf);
+    llvm::tie(StSameBuf, StNotSameBuf) = state->assume(SameBuf);
 
     // If the two arguments might be the same buffer, we know the result is zero,
     // and we only need to check one size.

Modified: cfe/trunk/lib/Checker/DereferenceChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/DereferenceChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/DereferenceChecker.cpp (original)
+++ cfe/trunk/lib/Checker/DereferenceChecker.cpp Wed Dec  1 16:16:56 2010
@@ -107,7 +107,7 @@
 
   const GRState *state = C.getState();
   const GRState *notNullState, *nullState;
-  llvm::tie(notNullState, nullState) = state->Assume(location);
+  llvm::tie(notNullState, nullState) = state->assume(location);
 
   // The explicit NULL case.
   if (nullState) {

Modified: cfe/trunk/lib/Checker/DivZeroChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/DivZeroChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/DivZeroChecker.cpp (original)
+++ cfe/trunk/lib/Checker/DivZeroChecker.cpp Wed Dec  1 16:16:56 2010
@@ -61,7 +61,7 @@
   // Check for divide by zero.
   ConstraintManager &CM = C.getConstraintManager();
   const GRState *stateNotZero, *stateZero;
-  llvm::tie(stateNotZero, stateZero) = CM.AssumeDual(C.getState(), *DV);
+  llvm::tie(stateNotZero, stateZero) = CM.assumeDual(C.getState(), *DV);
 
   if (stateZero && !stateNotZero) {
     if (ExplodedNode *N = C.GenerateSink(stateZero)) {

Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Wed Dec  1 16:16:56 2010
@@ -392,7 +392,7 @@
       if (!Constraint)
         break;
 
-      if (const GRState *newState = state->Assume(*Constraint, true))
+      if (const GRState *newState = state->assume(*Constraint, true))
         state = newState;
 
       break;
@@ -407,7 +407,7 @@
 
       if (const Loc *LV = dyn_cast<Loc>(&V)) {
         // Assume that the pointer value in 'self' is non-null.
-        state = state->Assume(*LV, true);
+        state = state->assume(*LV, true);
         assert(state && "'self' cannot be null");
       }
     }
@@ -458,13 +458,14 @@
 
       state = C->evalAssume(state, cond, assumption, &respondsToCallback);
 
-      // Check if we're building the cache of checkers that care about Assumes.
+      // Check if we're building the cache of checkers that care about
+      // assumptions.
       if (NewCO.get() && respondsToCallback)
         NewCO->push_back(*I);
     }
 
     // If we got through all the checkers, and we built a list of those that
-    // care about Assumes, save it.
+    // care about assumptions, save it.
     if (NewCO.get())
       CO_Ref = NewCO.take();
   }
@@ -1450,7 +1451,7 @@
 
   // Process the true branch.
   if (builder.isFeasible(true)) {
-    if (const GRState *state = PrevState->Assume(V, true))
+    if (const GRState *state = PrevState->assume(V, true))
       builder.generateNode(MarkBranch(state, Term, true), true);
     else
       builder.markInfeasible(true);
@@ -1458,7 +1459,7 @@
 
   // Process the false branch.
   if (builder.isFeasible(false)) {
-    if (const GRState *state = PrevState->Assume(V, false))
+    if (const GRState *state = PrevState->assume(V, false))
       builder.generateNode(MarkBranch(state, Term, false), false);
     else
       builder.markInfeasible(false);
@@ -1601,7 +1602,7 @@
                                                CondV, CaseVal);
 
       // Now "assume" that the case matches.
-      if (const GRState* stateNew = state->Assume(Res, true)) {
+      if (const GRState* stateNew = state->assume(Res, true)) {
         builder.generateCaseStmtNode(I, stateNew);
 
         // If CondV evaluates to a constant, then we know that this
@@ -1614,7 +1615,7 @@
       // Now "assume" that the case doesn't match.  Add this state
       // to the default state (if it is feasible).
       if (DefaultSt) {
-        if (const GRState *stateNew = DefaultSt->Assume(Res, false)) {
+        if (const GRState *stateNew = DefaultSt->assume(Res, false)) {
           defaultIsFeasible = true;
           DefaultSt = stateNew;
         }
@@ -1731,11 +1732,11 @@
     // value later when necessary.  We don't have the machinery in place for
     // this right now, and since most logical expressions are used for branches,
     // the payoff is not likely to be large.  Instead, we do eager evaluation.
-    if (const GRState *newState = state->Assume(XD, true))
+    if (const GRState *newState = state->assume(XD, true))
       MakeNode(Dst, B, Pred,
                newState->BindExpr(B, ValMgr.makeIntVal(1U, B->getType())));
 
-    if (const GRState *newState = state->Assume(XD, false))
+    if (const GRState *newState = state->assume(XD, false))
       MakeNode(Dst, B, Pred,
                newState->BindExpr(B, ValMgr.makeIntVal(0U, B->getType())));
   }
@@ -2263,7 +2264,7 @@
     SVal V = state->getSVal(Ex);
     if (nonloc::SymExprVal *SEV = dyn_cast<nonloc::SymExprVal>(&V)) {
       // First assume that the condition is true.
-      if (const GRState *stateTrue = state->Assume(*SEV, true)) {
+      if (const GRState *stateTrue = state->assume(*SEV, true)) {
         stateTrue = stateTrue->BindExpr(Ex,
                                         ValMgr.makeIntVal(1U, Ex->getType()));
         Dst.Add(Builder->generateNode(PostStmtCustom(Ex,
@@ -2272,7 +2273,7 @@
       }
 
       // Next, assume that the condition is false.
-      if (const GRState *stateFalse = state->Assume(*SEV, false)) {
+      if (const GRState *stateFalse = state->assume(*SEV, false)) {
         stateFalse = stateFalse->BindExpr(Ex,
                                           ValMgr.makeIntVal(0U, Ex->getType()));
         Dst.Add(Builder->generateNode(PostStmtCustom(Ex, &EagerlyAssumeTag,
@@ -2509,7 +2510,7 @@
         cast<DefinedOrUnknownSVal>(state->getSVal(Receiver));
 
       const GRState *notNilState, *nilState;
-      llvm::tie(notNilState, nilState) = state->Assume(receiverVal);
+      llvm::tie(notNilState, nilState) = state->assume(receiverVal);
 
       // There are three cases: can be nil or non-nil, must be nil, must be
       // non-nil. We handle must be nil, and merge the rest two into non-nil.
@@ -3270,14 +3271,14 @@
           DefinedOrUnknownSVal Constraint =
             svalBuilder.evalEQ(state, V2, ValMgr.makeZeroVal(U->getType()));
 
-          if (!state->Assume(Constraint, true)) {
+          if (!state->assume(Constraint, true)) {
             // It isn't feasible for the original value to be null.
             // Propagate this constraint.
             Constraint = svalBuilder.evalEQ(state, SymVal,
                                        ValMgr.makeZeroVal(U->getType()));
 
 
-            state = state->Assume(Constraint, false);
+            state = state->assume(Constraint, false);
             assert(state);
           }
         }

Modified: cfe/trunk/lib/Checker/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRState.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRState.cpp (original)
+++ cfe/trunk/lib/Checker/GRState.cpp Wed Dec  1 16:16:56 2010
@@ -230,7 +230,7 @@
   return getStateManager().getPersistentState(NewSt);
 }
 
-const GRState *GRState::AssumeInBound(DefinedOrUnknownSVal Idx,
+const GRState *GRState::assumeInBound(DefinedOrUnknownSVal Idx,
                                       DefinedOrUnknownSVal UpperBound,
                                       bool Assumption) const {
   if (Idx.isUnknown() || UpperBound.isUnknown())
@@ -271,7 +271,7 @@
 
   // Finally, let the constraint manager take care of it.
   ConstraintManager &CM = SM.getConstraintManager();
-  return CM.Assume(this, cast<DefinedSVal>(inBound), Assumption);
+  return CM.assume(this, cast<DefinedSVal>(inBound), Assumption);
 }
 
 const GRState* GRStateManager::getInitialState(const LocationContext *InitLoc) {

Modified: cfe/trunk/lib/Checker/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MallocChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MallocChecker.cpp (original)
+++ cfe/trunk/lib/Checker/MallocChecker.cpp Wed Dec  1 16:16:56 2010
@@ -244,7 +244,7 @@
   SValBuilder &svalBuilder = ValMgr.getSValBuilder();
   DefinedOrUnknownSVal ExtentMatchesSize =
     svalBuilder.evalEQ(state, Extent, DefinedSize);
-  state = state->Assume(ExtentMatchesSize, true);
+  state = state->assume(ExtentMatchesSize, true);
 
   SymbolRef Sym = RetVal.getAsLocSymbol();
   assert(Sym);
@@ -288,7 +288,7 @@
   // FIXME: Technically using 'Assume' here can result in a path
   //  bifurcation.  In such cases we need to return two states, not just one.
   const GRState *notNullState, *nullState;
-  llvm::tie(notNullState, nullState) = state->Assume(location);
+  llvm::tie(notNullState, nullState) = state->assume(location);
 
   // The explicit NULL case, no operation is performed.
   if (nullState && !notNullState)
@@ -509,7 +509,7 @@
   DefinedOrUnknownSVal PtrEQ = svalBuilder.evalEQ(state, Arg0Val, ValMgr.makeNull());
 
   // If the ptr is NULL, the call is equivalent to malloc(size).
-  if (const GRState *stateEqual = state->Assume(PtrEQ, true)) {
+  if (const GRState *stateEqual = state->assume(PtrEQ, true)) {
     // Hack: set the NULL symbolic region to released to suppress false warning.
     // In the future we should add more states for allocated regions, e.g., 
     // CheckedNull, CheckedNonNull.
@@ -523,20 +523,20 @@
     C.addTransition(stateMalloc);
   }
 
-  if (const GRState *stateNotEqual = state->Assume(PtrEQ, false)) {
+  if (const GRState *stateNotEqual = state->assume(PtrEQ, false)) {
     const Expr *Arg1 = CE->getArg(1);
     DefinedOrUnknownSVal Arg1Val = 
       cast<DefinedOrUnknownSVal>(stateNotEqual->getSVal(Arg1));
     DefinedOrUnknownSVal SizeZero = svalBuilder.evalEQ(stateNotEqual, Arg1Val,
                                       ValMgr.makeIntValWithPtrWidth(0, false));
 
-    if (const GRState *stateSizeZero = stateNotEqual->Assume(SizeZero, true)) {
+    if (const GRState *stateSizeZero = stateNotEqual->assume(SizeZero, true)) {
       const GRState *stateFree = FreeMemAux(C, CE, stateSizeZero, 0, false);
       if (stateFree)
         C.addTransition(stateFree->BindExpr(CE, UndefinedVal(), true));
     }
 
-    if (const GRState *stateSizeNotZero=stateNotEqual->Assume(SizeZero,false)) {
+    if (const GRState *stateSizeNotZero=stateNotEqual->assume(SizeZero,false)) {
       const GRState *stateFree = FreeMemAux(C, CE, stateSizeNotZero, 0, false);
       if (stateFree) {
         // FIXME: We should copy the content of the original buffer.
@@ -697,7 +697,7 @@
     if (const RefState *RS = state->get<RegionState>(Sym)) {
       // If ptr is NULL, no operation is performed.
       const GRState *notNullState, *nullState;
-      llvm::tie(notNullState, nullState) = state->Assume(l);
+      llvm::tie(notNullState, nullState) = state->assume(l);
 
       // Generate a transition for 'nullState' to record the assumption
       // that the state was null.

Modified: cfe/trunk/lib/Checker/OSAtomicChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/OSAtomicChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/OSAtomicChecker.cpp (original)
+++ cfe/trunk/lib/Checker/OSAtomicChecker.cpp Wed Dec  1 16:16:56 2010
@@ -147,7 +147,7 @@
     // Perform the comparison.
     DefinedOrUnknownSVal Cmp = svalBuilder.evalEQ(stateLoad,theValueVal,oldValueVal);
 
-    const GRState *stateEqual = stateLoad->Assume(Cmp, true);
+    const GRState *stateEqual = stateLoad->assume(Cmp, true);
 
     // Were they equal?
     if (stateEqual) {
@@ -188,7 +188,7 @@
     }
 
     // Were they not equal?
-    if (const GRState *stateNotEqual = stateLoad->Assume(Cmp, false)) {
+    if (const GRState *stateNotEqual = stateLoad->assume(Cmp, false)) {
       // Check for 'void' return type if we have a bogus function prototype.
       SVal Res = UnknownVal();
       QualType T = CE->getType();

Modified: cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ObjCAtSyncChecker.cpp Wed Dec  1 16:16:56 2010
@@ -64,7 +64,7 @@
 
   // Check for null mutexes.
   const GRState *notNullState, *nullState;
-  llvm::tie(notNullState, nullState) = state->Assume(cast<DefinedSVal>(V));
+  llvm::tie(notNullState, nullState) = state->assume(cast<DefinedSVal>(V));
 
   if (nullState) {
     if (!notNullState) {

Modified: cfe/trunk/lib/Checker/PthreadLockChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/PthreadLockChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/PthreadLockChecker.cpp (original)
+++ cfe/trunk/lib/Checker/PthreadLockChecker.cpp Wed Dec  1 16:16:56 2010
@@ -106,13 +106,13 @@
   if (isTryLock) {
       // Bifurcate the state, and allow a mode where the lock acquisition fails.
     const GRState *lockFail;
-    llvm::tie(lockFail, lockSucc) = state->Assume(retVal);    
+    llvm::tie(lockFail, lockSucc) = state->assume(retVal);    
     assert(lockFail && lockSucc);
     C.addTransition(C.GenerateNode(CE, lockFail));
   }
   else {
       // Assume that the return value was 0.
-    lockSucc = state->Assume(retVal, false);
+    lockSucc = state->assume(retVal, false);
     assert(lockSucc);
   }
   

Modified: cfe/trunk/lib/Checker/RangeConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RangeConstraintManager.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RangeConstraintManager.cpp (original)
+++ cfe/trunk/lib/Checker/RangeConstraintManager.cpp Wed Dec  1 16:16:56 2010
@@ -208,27 +208,27 @@
   RangeConstraintManager(GRSubEngine &subengine)
     : SimpleConstraintManager(subengine) {}
 
-  const GRState* AssumeSymNE(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymNE(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& Int,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymEQ(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymEQ(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& Int,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymLT(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymLT(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& Int,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymGT(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymGT(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& Int,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymGE(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymGE(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& Int,
                              const llvm::APSInt& Adjustment);
 
-  const GRState* AssumeSymLE(const GRState* state, SymbolRef sym,
+  const GRState *assumeSymLE(const GRState* state, SymbolRef sym,
                              const llvm::APSInt& Int,
                              const llvm::APSInt& Adjustment);
 
@@ -293,7 +293,7 @@
 }
 
 //===------------------------------------------------------------------------===
-// AssumeSymX methods: public interface for RangeConstraintManager.
+// assumeSymX methods: public interface for RangeConstraintManager.
 //===------------------------------------------------------------------------===/
 
 // The syntax for ranges below is mathematical, using [x, y] for closed ranges
@@ -305,7 +305,7 @@
 // UINT_MAX, 0, 1, and 2.
 
 const GRState*
-RangeConstraintManager::AssumeSymNE(const GRState* state, SymbolRef sym,
+RangeConstraintManager::assumeSymNE(const GRState* state, SymbolRef sym,
                                     const llvm::APSInt& Int,
                                     const llvm::APSInt& Adjustment) {
   BasicValueFactory &BV = state->getBasicVals();
@@ -322,7 +322,7 @@
 }
 
 const GRState*
-RangeConstraintManager::AssumeSymEQ(const GRState* state, SymbolRef sym,
+RangeConstraintManager::assumeSymEQ(const GRState* state, SymbolRef sym,
                                     const llvm::APSInt& Int,
                                     const llvm::APSInt& Adjustment) {
   // [Int-Adjustment, Int-Adjustment]
@@ -333,7 +333,7 @@
 }
 
 const GRState*
-RangeConstraintManager::AssumeSymLT(const GRState* state, SymbolRef sym,
+RangeConstraintManager::assumeSymLT(const GRState* state, SymbolRef sym,
                                     const llvm::APSInt& Int,
                                     const llvm::APSInt& Adjustment) {
   BasicValueFactory &BV = state->getBasicVals();
@@ -354,7 +354,7 @@
 }
 
 const GRState*
-RangeConstraintManager::AssumeSymGT(const GRState* state, SymbolRef sym,
+RangeConstraintManager::assumeSymGT(const GRState* state, SymbolRef sym,
                                     const llvm::APSInt& Int,
                                     const llvm::APSInt& Adjustment) {
   BasicValueFactory &BV = state->getBasicVals();
@@ -375,7 +375,7 @@
 }
 
 const GRState*
-RangeConstraintManager::AssumeSymGE(const GRState* state, SymbolRef sym,
+RangeConstraintManager::assumeSymGE(const GRState* state, SymbolRef sym,
                                     const llvm::APSInt& Int,
                                     const llvm::APSInt& Adjustment) {
   BasicValueFactory &BV = state->getBasicVals();
@@ -397,7 +397,7 @@
 }
 
 const GRState*
-RangeConstraintManager::AssumeSymLE(const GRState* state, SymbolRef sym,
+RangeConstraintManager::assumeSymLE(const GRState* state, SymbolRef sym,
                                     const llvm::APSInt& Int,
                                     const llvm::APSInt& Adjustment) {
   BasicValueFactory &BV = state->getBasicVals();

Modified: cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ReturnPointerRangeChecker.cpp Wed Dec  1 16:16:56 2010
@@ -65,8 +65,8 @@
     = C.getStoreManager().getSizeInElements(state, ER->getSuperRegion(),
                                            ER->getValueType());
 
-  const GRState *StInBound = state->AssumeInBound(Idx, NumElements, true);
-  const GRState *StOutBound = state->AssumeInBound(Idx, NumElements, false);
+  const GRState *StInBound = state->assumeInBound(Idx, NumElements, true);
+  const GRState *StOutBound = state->assumeInBound(Idx, NumElements, false);
   if (StOutBound && !StInBound) {
     ExplodedNode *N = C.GenerateSink(StOutBound);
 

Modified: cfe/trunk/lib/Checker/SimpleConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/SimpleConstraintManager.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/SimpleConstraintManager.cpp (original)
+++ cfe/trunk/lib/Checker/SimpleConstraintManager.cpp Wed Dec  1 16:16:56 2010
@@ -55,22 +55,22 @@
   return true;
 }
 
-const GRState *SimpleConstraintManager::Assume(const GRState *state,
+const GRState *SimpleConstraintManager::assume(const GRState *state,
                                                DefinedSVal Cond,
                                                bool Assumption) {
   if (isa<NonLoc>(Cond))
-    return Assume(state, cast<NonLoc>(Cond), Assumption);
+    return assume(state, cast<NonLoc>(Cond), Assumption);
   else
-    return Assume(state, cast<Loc>(Cond), Assumption);
+    return assume(state, cast<Loc>(Cond), Assumption);
 }
 
-const GRState *SimpleConstraintManager::Assume(const GRState *state, Loc cond,
+const GRState *SimpleConstraintManager::assume(const GRState *state, Loc cond,
                                                bool assumption) {
-  state = AssumeAux(state, cond, assumption);
+  state = assumeAux(state, cond, assumption);
   return SU.ProcessAssume(state, cond, assumption);
 }
 
-const GRState *SimpleConstraintManager::AssumeAux(const GRState *state,
+const GRState *SimpleConstraintManager::assumeAux(const GRState *state,
                                                   Loc Cond, bool Assumption) {
 
   BasicValueFactory &BasicVals = state->getBasicVals();
@@ -91,9 +91,9 @@
       if (const SymbolicRegion *SymR = dyn_cast<SymbolicRegion>(SubR)) {
         const llvm::APSInt &zero = BasicVals.getZeroWithPtrWidth();
         if (Assumption)
-          return AssumeSymNE(state, SymR->getSymbol(), zero, zero);
+          return assumeSymNE(state, SymR->getSymbol(), zero, zero);
         else
-          return AssumeSymEQ(state, SymR->getSymbol(), zero, zero);
+          return assumeSymEQ(state, SymR->getSymbol(), zero, zero);
       }
       SubR = dyn_cast<SubRegion>(SubR->getSuperRegion());
     }
@@ -112,10 +112,10 @@
   } // end switch
 }
 
-const GRState *SimpleConstraintManager::Assume(const GRState *state,
+const GRState *SimpleConstraintManager::assume(const GRState *state,
                                                NonLoc cond,
                                                bool assumption) {
-  state = AssumeAux(state, cond, assumption);
+  state = assumeAux(state, cond, assumption);
   return SU.ProcessAssume(state, cond, assumption);
 }
 
@@ -134,7 +134,7 @@
   }
 }
 
-const GRState *SimpleConstraintManager::AssumeAux(const GRState *state,
+const GRState *SimpleConstraintManager::assumeAux(const GRState *state,
                                                   NonLoc Cond,
                                                   bool Assumption) {
 
@@ -159,9 +159,9 @@
     QualType T =  SymMgr.getType(sym);
     const llvm::APSInt &zero = BasicVals.getValue(0, T);
     if (Assumption)
-      return AssumeSymNE(state, sym, zero, zero);
+      return assumeSymNE(state, sym, zero, zero);
     else
-      return AssumeSymEQ(state, sym, zero, zero);
+      return assumeSymEQ(state, sym, zero, zero);
   }
 
   case nonloc::SymExprValKind: {
@@ -179,14 +179,14 @@
       QualType T = SymMgr.getType(SE);
       const llvm::APSInt &zero = BasicVals.getValue(0, T);
       op = (Assumption ? BO_NE : BO_EQ);
-      return AssumeSymRel(state, SE, op, zero);
+      return assumeSymRel(state, SE, op, zero);
     }
 
     // From here on out, op is the real comparison we'll be testing.
     if (!Assumption)
       op = NegateComparison(op);
   
-    return AssumeSymRel(state, SE->getLHS(), op, SE->getRHS());
+    return assumeSymRel(state, SE->getLHS(), op, SE->getRHS());
   }
 
   case nonloc::ConcreteIntKind: {
@@ -196,12 +196,12 @@
   }
 
   case nonloc::LocAsIntegerKind:
-    return AssumeAux(state, cast<nonloc::LocAsInteger>(Cond).getLoc(),
+    return assumeAux(state, cast<nonloc::LocAsInteger>(Cond).getLoc(),
                      Assumption);
   } // end switch
 }
 
-const GRState *SimpleConstraintManager::AssumeSymRel(const GRState *state,
+const GRState *SimpleConstraintManager::assumeSymRel(const GRState *state,
                                                      const SymExpr *LHS,
                                                      BinaryOperator::Opcode op,
                                                      const llvm::APSInt& Int) {
@@ -273,26 +273,26 @@
 
   switch (op) {
   default:
-    // No logic yet for other operators.  Assume the constraint is feasible.
+    // No logic yet for other operators.  assume the constraint is feasible.
     return state;
 
   case BO_EQ:
-    return AssumeSymEQ(state, Sym, ConvertedInt, Adjustment);
+    return assumeSymEQ(state, Sym, ConvertedInt, Adjustment);
 
   case BO_NE:
-    return AssumeSymNE(state, Sym, ConvertedInt, Adjustment);
+    return assumeSymNE(state, Sym, ConvertedInt, Adjustment);
 
   case BO_GT:
-    return AssumeSymGT(state, Sym, ConvertedInt, Adjustment);
+    return assumeSymGT(state, Sym, ConvertedInt, Adjustment);
 
   case BO_GE:
-    return AssumeSymGE(state, Sym, ConvertedInt, Adjustment);
+    return assumeSymGE(state, Sym, ConvertedInt, Adjustment);
 
   case BO_LT:
-    return AssumeSymLT(state, Sym, ConvertedInt, Adjustment);
+    return assumeSymLT(state, Sym, ConvertedInt, Adjustment);
 
   case BO_LE:
-    return AssumeSymLE(state, Sym, ConvertedInt, Adjustment);
+    return assumeSymLE(state, Sym, ConvertedInt, Adjustment);
   } // end switch
 }
 

Modified: cfe/trunk/lib/Checker/SimpleConstraintManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/SimpleConstraintManager.h?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/SimpleConstraintManager.h (original)
+++ cfe/trunk/lib/Checker/SimpleConstraintManager.h Wed Dec  1 16:16:56 2010
@@ -31,14 +31,14 @@
 
   bool canReasonAbout(SVal X) const;
 
-  const GRState *Assume(const GRState *state, DefinedSVal Cond,
+  const GRState *assume(const GRState *state, DefinedSVal Cond,
                         bool Assumption);
 
-  const GRState *Assume(const GRState *state, Loc Cond, bool Assumption);
+  const GRState *assume(const GRState *state, Loc Cond, bool Assumption);
 
-  const GRState *Assume(const GRState *state, NonLoc Cond, bool Assumption);
+  const GRState *assume(const GRState *state, NonLoc Cond, bool Assumption);
 
-  const GRState *AssumeSymRel(const GRState *state,
+  const GRState *assumeSymRel(const GRState *state,
                               const SymExpr *LHS,
                               BinaryOperator::Opcode op,
                               const llvm::APSInt& Int);
@@ -51,27 +51,27 @@
 
   // Each of these is of the form "$sym+Adj <> V", where "<>" is the comparison
   // operation for the method being invoked.
-  virtual const GRState *AssumeSymNE(const GRState *state, SymbolRef sym,
+  virtual const GRState *assumeSymNE(const GRState *state, SymbolRef sym,
                                      const llvm::APSInt& V,
                                      const llvm::APSInt& Adjustment) = 0;
 
-  virtual const GRState *AssumeSymEQ(const GRState *state, SymbolRef sym,
+  virtual const GRState *assumeSymEQ(const GRState *state, SymbolRef sym,
                                      const llvm::APSInt& V,
                                      const llvm::APSInt& Adjustment) = 0;
 
-  virtual const GRState *AssumeSymLT(const GRState *state, SymbolRef sym,
+  virtual const GRState *assumeSymLT(const GRState *state, SymbolRef sym,
                                      const llvm::APSInt& V,
                                      const llvm::APSInt& Adjustment) = 0;
 
-  virtual const GRState *AssumeSymGT(const GRState *state, SymbolRef sym,
+  virtual const GRState *assumeSymGT(const GRState *state, SymbolRef sym,
                                      const llvm::APSInt& V,
                                      const llvm::APSInt& Adjustment) = 0;
 
-  virtual const GRState *AssumeSymLE(const GRState *state, SymbolRef sym,
+  virtual const GRState *assumeSymLE(const GRState *state, SymbolRef sym,
                                      const llvm::APSInt& V,
                                      const llvm::APSInt& Adjustment) = 0;
 
-  virtual const GRState *AssumeSymGE(const GRState *state, SymbolRef sym,
+  virtual const GRState *assumeSymGE(const GRState *state, SymbolRef sym,
                                      const llvm::APSInt& V,
                                      const llvm::APSInt& Adjustment) = 0;
 
@@ -79,9 +79,9 @@
   // Internal implementation.
   //===------------------------------------------------------------------===//
 
-  const GRState *AssumeAux(const GRState *state, Loc Cond,bool Assumption);
+  const GRState *assumeAux(const GRState *state, Loc Cond,bool Assumption);
 
-  const GRState *AssumeAux(const GRState *state, NonLoc Cond, bool Assumption);
+  const GRState *assumeAux(const GRState *state, NonLoc Cond, bool Assumption);
 };
 
 }  // end clang namespace

Modified: cfe/trunk/lib/Checker/StreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/StreamChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/StreamChecker.cpp (original)
+++ cfe/trunk/lib/Checker/StreamChecker.cpp Wed Dec  1 16:16:56 2010
@@ -233,7 +233,7 @@
   // Bifurcate the state into two: one with a valid FILE* pointer, the other
   // with a NULL.
   const GRState *stateNotNull, *stateNull;
-  llvm::tie(stateNotNull, stateNull) = CM.AssumeDual(state, RetVal);
+  llvm::tie(stateNotNull, stateNull) = CM.assumeDual(state, RetVal);
   
   if (SymbolRef Sym = RetVal.getAsSymbol()) {
     // if RetVal is not NULL, set the symbol's state to Opened.
@@ -347,7 +347,7 @@
 
   ConstraintManager &CM = C.getConstraintManager();
   const GRState *stateNotNull, *stateNull;
-  llvm::tie(stateNotNull, stateNull) = CM.AssumeDual(state, *DV);
+  llvm::tie(stateNotNull, stateNull) = CM.assumeDual(state, *DV);
 
   if (!stateNotNull && stateNull) {
     if (ExplodedNode *N = C.GenerateSink(stateNull)) {

Modified: cfe/trunk/lib/Checker/UnixAPIChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/UnixAPIChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/UnixAPIChecker.cpp (original)
+++ cfe/trunk/lib/Checker/UnixAPIChecker.cpp Wed Dec  1 16:16:56 2010
@@ -110,7 +110,7 @@
 
   // Check if maskedFlags is non-zero.
   const GRState *trueState, *falseState;
-  llvm::tie(trueState, falseState) = state->Assume(maskedFlags);
+  llvm::tie(trueState, falseState) = state->assume(maskedFlags);
 
   // Only emit an error if the value of 'maskedFlags' is properly
   // constrained;
@@ -195,7 +195,7 @@
     return;
   
   const GRState *trueState, *falseState;
-  llvm::tie(trueState, falseState) = state->Assume(cast<DefinedSVal>(argVal));
+  llvm::tie(trueState, falseState) = state->assume(cast<DefinedSVal>(argVal));
   
   // Is the value perfectly constrained to zero?
   if (falseState && !trueState) {

Modified: cfe/trunk/lib/Checker/VLASizeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/VLASizeChecker.cpp?rev=120614&r1=120613&r2=120614&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/VLASizeChecker.cpp (original)
+++ cfe/trunk/lib/Checker/VLASizeChecker.cpp Wed Dec  1 16:16:56 2010
@@ -83,7 +83,7 @@
   DefinedSVal sizeD = cast<DefinedSVal>(sizeV);
 
   const GRState *stateNotZero, *stateZero;
-  llvm::tie(stateNotZero, stateZero) = state->Assume(sizeD);
+  llvm::tie(stateNotZero, stateZero) = state->assume(sizeD);
 
   if (stateZero && !stateNotZero) {
     ExplodedNode* N = C.GenerateSink(stateZero);
@@ -120,12 +120,12 @@
   SVal ArraySizeVal = SV.evalBinOpNN(state, BO_Mul, ArrayLength,
                                      cast<NonLoc>(EleSizeVal), SizeTy);
 
-  // Finally, Assume that the array's extent matches the given size.
+  // Finally, assume that the array's extent matches the given size.
   const LocationContext *LC = C.getPredecessor()->getLocationContext();
   DefinedOrUnknownSVal Extent = state->getRegion(VD, LC)->getExtent(ValMgr);
   DefinedOrUnknownSVal ArraySize = cast<DefinedOrUnknownSVal>(ArraySizeVal);
   DefinedOrUnknownSVal SizeIsKnown = SV.evalEQ(state, Extent, ArraySize);
-  state = state->Assume(SizeIsKnown, true);
+  state = state->assume(SizeIsKnown, true);
 
   // Assume should not fail at this point.
   assert(state);





More information about the cfe-commits mailing list