diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-04 00:23:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-04 00:23:05 +0000 |
commit | cec3525f54aa6aeca7b00e7d2649570f0526492a (patch) | |
tree | eceee985be626a38db2073aa9ab5e26c4aceded2 /lib/Analysis/RegionStore.cpp | |
parent | dc402902277b8dd30fca50402b9e020ea7b5d353 (diff) |
RegionStore: Handle implicit parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 7bae5e4487..a05a42fdc3 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -704,15 +704,17 @@ 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) || VD->hasGlobalStorage()) { + if (VD == SelfDecl) + return loc::MemRegionVal(getSelfRegion(0)); + + if (isa<ParmVarDecl>(VD) || isa<ImplicitParamDecl>(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)); } |