[cfe-commits] r90582 - in /cfe/trunk: include/clang/Analysis/PathSensitive/SymbolManager.h lib/Analysis/BasicStore.cpp lib/Analysis/RegionStore.cpp lib/Analysis/SymbolManager.cpp

Ted Kremenek kremenek at apple.com
Fri Dec 4 12:32:20 PST 2009


Author: kremenek
Date: Fri Dec  4 14:32:20 2009
New Revision: 90582

URL: http://llvm.org/viewvc/llvm-project?rev=90582&view=rev
Log:
Replace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h
    cfe/trunk/lib/Analysis/BasicStore.cpp
    cfe/trunk/lib/Analysis/RegionStore.cpp
    cfe/trunk/lib/Analysis/SymbolManager.cpp

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

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h Fri Dec  4 14:32:20 2009
@@ -28,10 +28,11 @@
 }
 
 namespace clang {
-  class MemRegion;
-  class TypedRegion;
   class ASTContext;
   class BasicValueFactory;
+  class MemRegion;
+  class TypedRegion;
+  class VarRegion;
 }
 
 namespace clang {
@@ -345,10 +346,8 @@
     return Liveness.isLive(Loc, ExprVal);
   }
 
-  bool isLive(const Stmt* Loc, const VarDecl* VD) const {
-    return Liveness.isLive(Loc, VD);
-  }
-
+  bool isLive(const Stmt* Loc, const VarRegion *VR) const;
+  
   void markLive(SymbolRef sym);
   bool maybeDead(SymbolRef sym);
 

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

==============================================================================
--- cfe/trunk/lib/Analysis/BasicStore.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicStore.cpp Fri Dec  4 14:32:20 2009
@@ -368,7 +368,7 @@
   // Iterate over the variable bindings.
   for (BindingsTy::iterator I=B.begin(), E=B.end(); I!=E ; ++I) {
     if (const VarRegion *VR = dyn_cast<VarRegion>(I.getKey())) {
-      if (SymReaper.isLive(Loc, VR->getDecl()))
+      if (SymReaper.isLive(Loc, VR))
         RegionRoots.push_back(VR);
       else
         continue;

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

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Fri Dec  4 14:32:20 2009
@@ -1697,7 +1697,7 @@
     IntermediateVisited.insert(R);
     
     if (const VarRegion* VR = dyn_cast<VarRegion>(R)) {
-      if (SymReaper.isLive(Loc, VR->getDecl()))
+      if (SymReaper.isLive(Loc, VR))
         WorkList.push_back(std::make_pair(&state, VR));
       continue;
     }

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

==============================================================================
--- cfe/trunk/lib/Analysis/SymbolManager.cpp (original)
+++ cfe/trunk/lib/Analysis/SymbolManager.cpp Fri Dec  4 14:32:20 2009
@@ -220,4 +220,8 @@
   return isa<SymbolRegionValue>(sym);
 }
 
+bool SymbolReaper::isLive(const Stmt *Loc, const VarRegion *VR) const {
+  return Liveness.isLive(Loc, VR->getDecl());
+}
+
 SymbolVisitor::~SymbolVisitor() {}





More information about the cfe-commits mailing list