[cfe-commits] r112309 - /cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp

Tom Care tcare at apple.com
Fri Aug 27 15:35:28 PDT 2010


Author: tcare
Date: Fri Aug 27 17:35:28 2010
New Revision: 112309

URL: http://llvm.org/viewvc/llvm-project?rev=112309&view=rev
Log:
Fix bug in IdempotentOperationChecker where an assumption would not get updated properly.

Modified:
    cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp

Modified: cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp?rev=112309&r1=112308&r2=112309&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp (original)
+++ cfe/trunk/lib/Checker/IdempotentOperationChecker.cpp Fri Aug 27 17:35:28 2010
@@ -386,6 +386,10 @@
 // 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:





More information about the cfe-commits mailing list