diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-10-01 16:53:40 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-10-01 16:53:40 +0000 |
commit | ca5d78d0bc3010164f2f9682967d64d7e305a167 (patch) | |
tree | 24b45df814da8cfbc76c137e30e9d0bed087328b /lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp | |
parent | 1a00fee3933066024a2398f9456e5d6bc74344b9 (diff) |
[analyzer] Make ProgramStateManager's SubEngine parameter optional.
It is possible and valid to have a state manager and associated objects
without having a SubEngine or checkers.
Patch by Olaf Krzikalla!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp b/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp index 052075695b..4236ee470a 100644 --- a/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp +++ b/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp @@ -67,8 +67,8 @@ ProgramStateRef SimpleConstraintManager::assume(ProgramStateRef state, ProgramStateRef SimpleConstraintManager::assume(ProgramStateRef state, Loc cond, bool assumption) { state = assumeAux(state, cond, assumption); - if (NotifyAssumeClients) - return SU.processAssume(state, cond, assumption); + if (NotifyAssumeClients && SU) + return SU->processAssume(state, cond, assumption); return state; } @@ -115,8 +115,8 @@ ProgramStateRef SimpleConstraintManager::assume(ProgramStateRef state, NonLoc cond, bool assumption) { state = assumeAux(state, cond, assumption); - if (NotifyAssumeClients) - return SU.processAssume(state, cond, assumption); + if (NotifyAssumeClients && SU) + return SU->processAssume(state, cond, assumption); return state; } |