[cfe-commits] r95531 - in /cfe/trunk: include/clang/Checker/PathSensitive/Store.h lib/Checker/FlatStore.cpp lib/Checker/Store.cpp

Zhongxing Xu xuzhongxing at gmail.com
Sun Feb 7 22:00:22 PST 2010


Author: zhongxingxu
Date: Mon Feb  8 00:00:22 2010
New Revision: 95531

URL: http://llvm.org/viewvc/llvm-project?rev=95531&view=rev
Log:
ASTContext is now a reference member of StoreManager.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/Store.h
    cfe/trunk/lib/Checker/FlatStore.cpp
    cfe/trunk/lib/Checker/Store.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/Store.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/Store.h?rev=95531&r1=95530&r2=95531&view=diff

==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/Store.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/Store.h Mon Feb  8 00:00:22 2010
@@ -41,6 +41,7 @@
 
   /// MRMgr - Manages region objects associated with this StoreManager.
   MemRegionManager &MRMgr;
+  ASTContext &Ctx;
 
   StoreManager(GRStateManager &stateMgr);
 

Modified: cfe/trunk/lib/Checker/FlatStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/FlatStore.cpp?rev=95531&r1=95530&r2=95531&view=diff

==============================================================================
--- cfe/trunk/lib/Checker/FlatStore.cpp (original)
+++ cfe/trunk/lib/Checker/FlatStore.cpp Mon Feb  8 00:00:22 2010
@@ -179,8 +179,8 @@
 Interval FlatStoreManager::RegionToInterval(const MemRegion *R) { 
   switch (R->getKind()) {
   case MemRegion::VarRegionKind: {
-    QualType T = cast<VarRegion>(R)->getValueType(StateMgr.getContext());
-    uint64_t Size = StateMgr.getContext().getTypeSize(T);
+    QualType T = cast<VarRegion>(R)->getValueType(Ctx);
+    uint64_t Size = Ctx.getTypeSize(T);
     return Interval(0, Size-1);
   }
   default:

Modified: cfe/trunk/lib/Checker/Store.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/Store.cpp?rev=95531&r1=95530&r2=95531&view=diff

==============================================================================
--- cfe/trunk/lib/Checker/Store.cpp (original)
+++ cfe/trunk/lib/Checker/Store.cpp Mon Feb  8 00:00:22 2010
@@ -19,7 +19,7 @@
 
 StoreManager::StoreManager(GRStateManager &stateMgr)
   : ValMgr(stateMgr.getValueManager()), StateMgr(stateMgr),
-    MRMgr(ValMgr.getRegionManager()) {}
+    MRMgr(ValMgr.getRegionManager()), Ctx(stateMgr.getContext()) {}
 
 const MemRegion *StoreManager::MakeElementRegion(const MemRegion *Base,
                                               QualType EleTy, uint64_t index) {





More information about the cfe-commits mailing list