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 | 52170722ecb7f70e76dc47134163e75c5cef857b (patch) | |
| tree | 90ed9492586cea38f25d5bd21fed87dfacd5d0c7 /clang/lib/Analysis/RegionStore.cpp | |
| parent | 6d2714738f6c9f191e196f54fc24fa3978ac43a2 (diff) | |
| download | bcm5719-llvm-52170722ecb7f70e76dc47134163e75c5cef857b.tar.gz bcm5719-llvm-52170722ecb7f70e76dc47134163e75c5cef857b.zip | |
RegionStore: Handle implicit parameters.
llvm-svn: 65987
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
| -rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index 7bae5e4487b..a05a42fdc39 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/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)); } |

