]> granicus.if.org Git - clang/commitdiff
Fix bug in IdempotentOperationChecker where an assumption would not get updated properly.
authorTom Care <tom.care@uqconnect.edu.au>
Fri, 27 Aug 2010 22:35:28 +0000 (22:35 +0000)
committerTom Care <tom.care@uqconnect.edu.au>
Fri, 27 Aug 2010 22:35:28 +0000 (22:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112309 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/IdempotentOperationChecker.cpp

index 4b26d467b65cacbc01a8c653a17b13c7e973686a..35fb83e877570bdb83891dc12def471b28aa4677 100644 (file)
@@ -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: