aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/IdempotentOperationChecker.cpp
diff options
context:
space:
mode:
authorTom Care <tom.care@uqconnect.edu.au>2010-08-27 22:35:28 +0000
committerTom Care <tom.care@uqconnect.edu.au>2010-08-27 22:35:28 +0000
commitd8421eddff2d63e8b1f317f8cd7b1aeee5fdfe8a (patch)
tree0d4052fc3fc5e7803597106cfc5bd6cee06847aa /lib/Checker/IdempotentOperationChecker.cpp
parent5add7541726348b9d1c8e96ac5031b87c41acff0 (diff)
Fix bug in IdempotentOperationChecker where an assumption would not get updated properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/IdempotentOperationChecker.cpp')
-rw-r--r--lib/Checker/IdempotentOperationChecker.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Checker/IdempotentOperationChecker.cpp b/lib/Checker/IdempotentOperationChecker.cpp
index 4b26d467b6..35fb83e877 100644
--- a/lib/Checker/IdempotentOperationChecker.cpp
+++ b/lib/Checker/IdempotentOperationChecker.cpp
@@ -386,6 +386,10 @@ void IdempotentOperationChecker::VisitEndAnalysis(ExplodedGraph &G,
// Updates the current assumption given the new assumption
inline void IdempotentOperationChecker::UpdateAssumption(Assumption &A,
const Assumption &New) {
+// If the assumption is the same, there is nothing to do
+ if (A == New)
+ return;
+
switch (A) {
// If we don't currently have an assumption, set it
case Possible: