diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-21 06:54:23 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-21 06:54:23 +0000 |
commit | 933c3e1dca3bb88bf113290ef0ade8f5262a89c0 (patch) | |
tree | 9126614a51850f213286f9a7752ea3ac6e24dc95 /lib/Analysis/BasicStore.cpp | |
parent | 8485ec6a1d7d7f25ea680ea3740bc1a11d2bb7cd (diff) |
Localize the special processing of array variable inside
GRExprEngine::VisitCast() so that other parts of the analyzer can be ignorant.
When we cast "array of type T" to "pointer to T", we get the loc::MemRegionVal
corresponding to the array variable. This is sufficient for BasicStore, but not
for RegionStore. RegionStore should get the element region for the first array
element in the cast. So next comes to the revamping of transfer functions for
different store model.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r-- | lib/Analysis/BasicStore.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index c37db36640..b42f210dd8 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -78,6 +78,7 @@ public: StoreManager* clang::CreateBasicStoreManager(GRStateManager& StMgr) { return new BasicStoreManager(StMgr); } + SVal BasicStoreManager::getLValueVar(const GRState* St, const VarDecl* VD) { return loc::MemRegionVal(MRMgr.getVarRegion(VD)); } |