aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BasicStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-06 21:58:46 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-06 21:58:46 +0000
commite1cea75e70d76f55157749a7bcad319050492945 (patch)
tree9612cec25221b3dd84461c85cad4cb3d8ff05e71 /lib/Analysis/BasicStore.cpp
parent0daea7a162bee39b1b1dd63b7bceccd3224a6a63 (diff)
Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line using '-analyzer-store=basic-new-cast'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r--lib/Analysis/BasicStore.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index 19d641ee97..c897b2f3fc 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -38,8 +38,8 @@ class VISIBILITY_HIDDEN BasicStoreManager : public StoreManager {
const MemRegion* SelfRegion;
public:
- BasicStoreManager(GRStateManager& mgr)
- : StoreManager(mgr),
+ BasicStoreManager(GRStateManager& mgr, bool useNewCastRegion = false)
+ : StoreManager(mgr, useNewCastRegion),
VBFactory(mgr.getAllocator()),
SelfRegion(0) {}
@@ -126,6 +126,10 @@ StoreManager* clang::CreateBasicStoreManager(GRStateManager& StMgr) {
return new BasicStoreManager(StMgr);
}
+StoreManager* clang::CreateBasicStoreNewCastManager(GRStateManager& StMgr) {
+ return new BasicStoreManager(StMgr, true);
+}
+
SVal BasicStoreManager::getLValueVar(const GRState *state, const VarDecl* VD) {
return ValMgr.makeLoc(MRMgr.getVarRegion(VD));
}