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
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index 19d641e..c897b2f 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -38,8 +38,8 @@
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 @@
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));
}