diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-02 18:25:09 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-02 18:25:09 +0000 |
commit | 1508636e99faddf569a57fce82c0fb3aa2124396 (patch) | |
tree | 3d8f24c32bb955b8cea5cf2b386ed44527b3ae00 /lib/Analysis/BasicStore.cpp | |
parent | d05552a21377f493c882298c59e8829040b01d34 (diff) |
StoreManagers: Use 'hasGlobalsStorage()' and 'hasParametersStorage()' instead of
directly consulting if a VarDecl is an implicit or actual parameter, a global,
etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r-- | lib/Analysis/BasicStore.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index d96ef5b948..ccaffc3627 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -528,10 +528,9 @@ Store BasicStoreManager::getInitialStore() { // Initialize globals and parameters to symbolic values. // Initialize local variables to undefined. const MemRegion *R = ValMgr.getRegionManager().getVarRegion(VD); - SVal X = (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD) || - isa<ImplicitParamDecl>(VD)) - ? ValMgr.getRegionValueSymbolVal(R) - : UndefinedVal(); + SVal X = R->hasGlobalsOrParametersStorage() + ? ValMgr.getRegionValueSymbolVal(R) + : UndefinedVal(); St = BindInternal(St, ValMgr.makeLoc(R), X); } |