summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/FlatStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-07-01 20:16:50 +0000
committerTed Kremenek <kremenek@apple.com>2010-07-01 20:16:50 +0000
commitbd862711fd108e273a67e68f26671bbb8e82a4b3 (patch)
tree7423e9ad154987391d6c8fe2131732e314f1df81 /clang/lib/Checker/FlatStore.cpp
parentf7488ec6dc7be25c33b05195d9c235035d431611 (diff)
downloadbcm5719-llvm-bd862711fd108e273a67e68f26671bbb8e82a4b3.tar.gz
bcm5719-llvm-bd862711fd108e273a67e68f26671bbb8e82a4b3.zip
Fix PR 7475 by enhancing the static analyzer to also invalidate bindings for non-static global variables
when calling a function/method whose impact on global variables we cannot accurately estimate. This change introduces two new MemSpaceRegions that divide up the memory space of globals, and causes RegionStore and BasicStore to consult a binding to the NonStaticGlobalsMemSpaceRegion when lazily determining the value of a global. llvm-svn: 107423
Diffstat (limited to 'clang/lib/Checker/FlatStore.cpp')
-rw-r--r--clang/lib/Checker/FlatStore.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/Checker/FlatStore.cpp b/clang/lib/Checker/FlatStore.cpp
index 2b6b1acad9a..64575b3c978 100644
--- a/clang/lib/Checker/FlatStore.cpp
+++ b/clang/lib/Checker/FlatStore.cpp
@@ -59,6 +59,11 @@ public:
Store InvalidateRegion(Store store, const MemRegion *R, const Expr *E,
unsigned Count, InvalidatedSymbols *IS);
+
+ Store InvalidateRegions(Store store, const MemRegion * const *I,
+ const MemRegion * const *E, const Expr *Ex,
+ unsigned Count, InvalidatedSymbols *IS,
+ bool invalidateGlobals);
void print(Store store, llvm::raw_ostream& Out, const char* nl,
const char *sep);
@@ -141,9 +146,20 @@ Store FlatStoreManager::BindDeclWithNoInit(Store store, const VarRegion *VR) {
return store;
}
+Store FlatStoreManager::InvalidateRegions(Store store,
+ const MemRegion * const *I,
+ const MemRegion * const *E,
+ const Expr *Ex, unsigned Count,
+ InvalidatedSymbols *IS,
+ bool invalidateGlobals) {
+ assert(false && "Not implemented");
+ return store;
+}
+
Store FlatStoreManager::InvalidateRegion(Store store, const MemRegion *R,
const Expr *E, unsigned Count,
InvalidatedSymbols *IS) {
+ assert(false && "Not implemented");
return store;
}
OpenPOWER on IntegriCloud