aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ProgramState.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-02-17 23:13:45 +0000
committerTed Kremenek <kremenek@apple.com>2012-02-17 23:13:45 +0000
commit3133f79cf451e6302dd05262b4bb53a3e4fd6300 (patch)
tree613e236257e18add8ade22ee2805c154bd1b15aa /lib/StaticAnalyzer/Core/ProgramState.cpp
parentd8a8a3b6ad7c786dfcf341b080bd19b5d4b84b5b (diff)
Have conjured symbols depend on LocationContext, to add context sensitivity for functions called more than once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ProgramState.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ProgramState.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp
index f52369ef4a..6f39c0321e 100644
--- a/lib/StaticAnalyzer/Core/ProgramState.cpp
+++ b/lib/StaticAnalyzer/Core/ProgramState.cpp
@@ -155,19 +155,21 @@ ProgramStateRef ProgramState::bindDefault(SVal loc, SVal V) const {
ProgramStateRef
ProgramState::invalidateRegions(ArrayRef<const MemRegion *> Regions,
const Expr *E, unsigned Count,
+ const LocationContext *LCtx,
StoreManager::InvalidatedSymbols *IS,
const CallOrObjCMessage *Call) const {
if (!IS) {
StoreManager::InvalidatedSymbols invalidated;
- return invalidateRegionsImpl(Regions, E, Count,
+ return invalidateRegionsImpl(Regions, E, Count, LCtx,
invalidated, Call);
}
- return invalidateRegionsImpl(Regions, E, Count, *IS, Call);
+ return invalidateRegionsImpl(Regions, E, Count, LCtx, *IS, Call);
}
ProgramStateRef
ProgramState::invalidateRegionsImpl(ArrayRef<const MemRegion *> Regions,
const Expr *E, unsigned Count,
+ const LocationContext *LCtx,
StoreManager::InvalidatedSymbols &IS,
const CallOrObjCMessage *Call) const {
ProgramStateManager &Mgr = getStateManager();
@@ -176,14 +178,14 @@ ProgramState::invalidateRegionsImpl(ArrayRef<const MemRegion *> Regions,
if (Eng && Eng->wantsRegionChangeUpdate(this)) {
StoreManager::InvalidatedRegions Invalidated;
const StoreRef &newStore
- = Mgr.StoreMgr->invalidateRegions(getStore(), Regions, E, Count, IS,
+ = Mgr.StoreMgr->invalidateRegions(getStore(), Regions, E, Count, LCtx, IS,
Call, &Invalidated);
ProgramStateRef newState = makeWithStore(newStore);
return Eng->processRegionChanges(newState, &IS, Regions, Invalidated, Call);
}
const StoreRef &newStore =
- Mgr.StoreMgr->invalidateRegions(getStore(), Regions, E, Count, IS,
+ Mgr.StoreMgr->invalidateRegions(getStore(), Regions, E, Count, LCtx, IS,
Call, NULL);
return makeWithStore(newStore);
}