RegionStore: Handle implicit parameters.

llvm-svn: 65987
This commit is contained in:
Ted Kremenek 2009-03-04 00:23:05 +00:00
parent 6d2714738f
commit 52170722ec
1 changed files with 5 additions and 3 deletions

View File

@ -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));
}