aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-02-19 09:56:08 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-02-19 09:56:08 +0000
commitd8895f64c46054b1e9cf17f96320cfa51349a35c (patch)
tree33ad9b220dac04438a193f771e70bec8996e2f50 /lib/Analysis/RegionStore.cpp
parent4b5d486a0a2cb535d8c7e3f5c258eb3cba8cad29 (diff)
only track integer and pointer values for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 58d8670d30..fe0ae17203 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -620,8 +620,13 @@ SVal RegionStoreManager::Retrieve(const GRState* St, Loc L, QualType T) {
if (const VarRegion* VR = dyn_cast<VarRegion>(R)) {
const VarDecl *VD = VR->getDecl();
- if (isa<ParmVarDecl>(VD))
- return SVal::GetRValueSymbolVal(getSymbolManager(), VR);
+ if (isa<ParmVarDecl>(VD) || VD->hasGlobalStorage()) {
+ QualType VTy = VD->getType();
+ if (Loc::IsLocType(VTy) || VTy->isIntegerType())
+ return SVal::GetRValueSymbolVal(getSymbolManager(), VR);
+ else
+ return UnknownVal();
+ }
else if (VD == SelfDecl)
return loc::MemRegionVal(getSelfRegion(0));
}