aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/RegionStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-06 04:04:46 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-06 04:04:46 +0000
commit81861abe9cd1669ca46e13866f77f7ece8c4c85f (patch)
tree591ac2a3e1463c2fa1e5f80a17c7c337399a11bc /lib/Checker/RegionStore.cpp
parent4dc1566a80648a74a19409c425809fa6a1683bef (diff)
Also teach RegionStore::RetrieveVar() to handle 'static' pointers that are implicitly initialized to NULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r--lib/Checker/RegionStore.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp
index 2e212db3e6..36022d5737 100644
--- a/lib/Checker/RegionStore.cpp
+++ b/lib/Checker/RegionStore.cpp
@@ -1407,7 +1407,9 @@ SVal RegionStoreManager::RetrieveVar(Store store, const VarRegion *R) {
if (T->isIntegerType())
return ValMgr.makeIntVal(0, T);
-
+ if (T->isPointerType())
+ return ValMgr.makeNull();
+
return UnknownVal();
}