StoreManagers: Use 'hasGlobalsStorage()' and 'hasParametersStorage()' instead of
directly consulting if a VarDecl is an implicit or actual parameter, a global,
etc.
llvm-svn: 74716
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index dc9a2be..9c76265 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/lib/Analysis/RegionStore.cpp
@@ -882,8 +882,7 @@
if (VD == SelfDecl)
return loc::MemRegionVal(getSelfRegion(0));
- if (isa<ParmVarDecl>(VD) || isa<ImplicitParamDecl>(VD) ||
- VD->hasGlobalStorage()) {
+ if (VR->hasGlobalsOrParametersStorage()) {
QualType VTy = VD->getType();
if (Loc::IsLocType(VTy) || VTy->isIntegerType())
return ValMgr.getRegionValueSymbolVal(VR);