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