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 | df67d426d9cd967a1a2a89610fd4b8d719a78a48 (patch) | |
tree | 888a030960432fc8f97cbe774c66a032bc44a33a /clang/lib/Analysis/BasicStore.cpp | |
parent | 7e4a9a02c3ed415c5f2a25c0d4fe5f47e762e16c (diff) | |
download | bcm5719-llvm-df67d426d9cd967a1a2a89610fd4b8d719a78a48.tar.gz bcm5719-llvm-df67d426d9cd967a1a2a89610fd4b8d719a78a48.zip |
StoreManagers: Use 'hasGlobalsStorage()' and 'hasParametersStorage()' instead of
directly consulting if a VarDecl is an implicit or actual parameter, a global,
etc.
llvm-svn: 74716
Diffstat (limited to 'clang/lib/Analysis/BasicStore.cpp')
-rw-r--r-- | clang/lib/Analysis/BasicStore.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Analysis/BasicStore.cpp b/clang/lib/Analysis/BasicStore.cpp index d96ef5b948c..ccaffc3627d 100644 --- a/clang/lib/Analysis/BasicStore.cpp +++ b/clang/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); } |