]> granicus.if.org Git - clang/commitdiff
Remove a redundant method. We have a const version.
authorZhongxing Xu <xuzhongxing@gmail.com>
Sat, 2 Apr 2011 03:20:45 +0000 (03:20 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Sat, 2 Apr 2011 03:20:45 +0000 (03:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128762 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h
lib/StaticAnalyzer/Checkers/MallocChecker.cpp

index c207226d729e451f0b3bf6c85a6f7e7adeb2240c..c90625110c7e8c23ea074f4c33dc3acb1fac339e 100644 (file)
@@ -273,8 +273,6 @@ public:
 
   SVal getSValAsScalarOrLoc(const MemRegion *R) const;
   
-  const llvm::APSInt *getSymVal(SymbolRef sym);
-
   bool scanReachableSymbols(SVal val, SymbolVisitor& visitor) const;
   
   bool scanReachableSymbols(const SVal *I, const SVal *E,
@@ -626,10 +624,6 @@ public:
 // Out-of-line method definitions for GRState.
 //===----------------------------------------------------------------------===//
 
-inline const llvm::APSInt *GRState::getSymVal(SymbolRef sym) {
-  return getStateManager().getSymVal(this, sym);
-}
-  
 inline const VarRegion* GRState::getRegion(const VarDecl *D,
                                            const LocationContext *LC) const {
   return getStateManager().getRegionManager().getVarRegion(D, LC);
index b10c80a266d3c8e831f4a485b1dc448cf8354f1f..a7655c4fb9d9d710a280a331726cd632be7ec492 100644 (file)
@@ -632,6 +632,7 @@ const GRState *MallocChecker::evalAssume(const GRState *state, SVal Cond,
   RegionStateTy RS = state->get<RegionState>();
 
   for (RegionStateTy::iterator I = RS.begin(), E = RS.end(); I != E; ++I) {
+    // If the symbol is assumed to NULL, this will return an APSInt*.
     if (state->getSymVal(I.getKey()))
       state = state->set<RegionState>(I.getKey(),RefState::getAllocateFailed());
   }