summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitbdfcacbe8f6631360243c0ff8429c06f77a1aa94 (patch)
tree1f0f88ada9078d4345599097575c64ee9c73e9c8 /clang/lib
parent30fe9ecac23bc5f9b6ec0af088c0cea94f167687 (diff)
downloadbcm5719-llvm-bdfcacbe8f6631360243c0ff8429c06f77a1aa94.tar.gz
bcm5719-llvm-bdfcacbe8f6631360243c0ff8429c06f77a1aa94.zip
Also teach RegionStore::RetrieveVar() to handle 'static' pointers that are implicitly initialized to NULL.
llvm-svn: 95479
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Checker/RegionStore.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp
index 2e212db3e62..36022d57376 100644
--- a/clang/lib/Checker/RegionStore.cpp
+++ b/clang/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();
}
OpenPOWER on IntegriCloud